Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Simple Row


I have this code that doesn't work - all it does is display "5 products returned" i want it to display the 5 records that are in my database - can someone tell me what stupid thing i've done wrong?

<?php
$query="SELECT * FROM products";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p>$num_results products returned</p>";
for ($i=0; $i <num_results; $i++)

{$row = mysql_fetch_array($result);
echo "<p><strong>".($i+1).". ID: ";
echo $row["ID"];
echo "</strong><br>Product: ";
echo $row["Product"];
echo "<br>Description: ";
echo $row["Description"];
echo "<br>image: ";
echo $row["Image"];
echo "<br>Cost: ";
echo $row["Cost"];
echo "</p>"; }?>




View Complete Forum Thread with Replies

Related Forum Messages:
Simple Script For Doing A Simple Photo Album And Journal?
I'm looking to quickly get a photo album online. Very simple, thumbnails,
a few pages, maybe a description, but hopefully a small script that's easy
to edit and work into my existing site. I know about hot scripts, etc. but
I was wondering if any one could recommend one?

Secondly, I also want to setup a journal. It's not really a "blog"
although I guess blog software may work. But it isn't going to be a
message board or anything like that. Just a place to put out random bits
of news. Once again, same premise, I'm trying to find the most simple
script possible that could basically traverse a directory of simple
textfiles and produce a list.

I know all about Blosxom and stuff like that, but I'd like a script that
just did the above and didn't overtake my site like PHPNuke or something
like that. I'll probably roll my own, but I thought I'd check first.

View Replies !
Simple Simple String Question
When I take the input from a textarea and insert it into a mysql-base and then retrieve it and show it, all the line feeds/breaks are gone.

It is shown as one giant string. How can this be fixed, so the text will be shown as it was entered? Does it have something to do with stripslashes/addslashes or am I way off?

View Replies !
Simple PHP IF, ELSE IF
the levels staff and member have been defined on another page to determine a users access level. What i want to do is pretty obvious, if a staff member has logged in then it shows different content to when a member is logged in, and if nobody has logged in, it shows a generic login message.

<?php if ($_SESSION['level'] == "staff") { ?>
<p><b>Welcome staff member <br />
<a href="../chooseupdate.php">
<?php echo $_SESSION['username']; ?> </a>
you're logged in.</b>
<? } elseif ($_SESSION['level'] == "member") { ?>
<p><b>Welcome user member <br />
<a href="../memberspage.php">
<?php echo $_SESSION['username']; ?> </a>
you're logged in.</b>
<? } else { ?>
<p><b>You are not Logged in!</b> <a href="../login.php">Log in</a> to check your messages.<br />
Do you want to <a href="../login.php">Log in</a> or <a href="../register.php">register</a>?</p> <? } ?>

Now when i add to this a page, i get the error "Parse error: parse error, unexpected $end"

Happens with this one aswell

<?php if ($_SESSION['loginFlag'] == 1) { ?>
<p>Would you like to log-out? <a href="../log-out.php">Log-out</a> </p>
<? } else { ?>
<p>Please <a href="../login.php" class="style2" accesskey="6"><strong>[6]</strong>Sign in</a> or <a href="../register.php" class="style2" accesskey="7"><strong>[7]</strong>Register</a></p><? } ?>

Now, I'm positive this worked on my colleges server, so it's got me thinking that maybe my php.ini file is messed up? Because this is also happening with my log-out file also, which is;

<?
// you must start session before destroying it
session_start();
session_destroy();

sleep(1);
header( 'Location: login.php' ) ;
?>


On my college server it works perfectly, at home it just loads the log-out.php page and doesn't redirect back to login.php, it also doesn't destroy the session.#

My php.ini is basically the default one, i got with WAMP. Except i enabled the header command to be used.

Thanks in advance.

View Replies !
Simple If/else
I know, it's sad, but I can't figure it out for the life of me. The update works if you comment out the insert statement; if you comment out the update, the insert statement works. If you combine both, then only update works. I know it's with the if/else (or the actual placement/naming of the query), but I can't figure out where to place it.

         <input type="hidden" name="submitted" value="TRUE" />
        <div align="center"><input type="submit" name="submit" value="Submit" />
   
<?
ob_start();
session_start();
include ('./marketing/includes/post.php');

$date = date('m.d.Y');

if (isset($_POST['submitted'])) { //Handle form
if(empty($_POST['name'])) {
echo '<br /><i>Please insert an artist name. </i>';
......................

View Replies !
Simple Bit Of PHP - HELP!
I have a site for use by some freinds, its basically a privacy proxy,but I want it to be password protected and have to get them to agree to terms and conditions. I have an index.php page in a subdomain, that has a short list of terms and conditions. I want them to have to check a box to say they agree & then also enter just a password to continue. It doesn't need to be secure. The password can be one for all.

It would be good if it was all contained in the one Index file. Then when both the tick box and checkbox is checked it takes you onto a difficult domain that can't be remembered. Does that make sense? It would be good if a pop up said that you need to agree to the terms if the check box is not checked and a different message is a password is not entered or is incorrect.

View Replies !
What Is The Best Way To Use Simple Templates In PHP?

What is the best way to use simple templates in PHP?

header, footer, etc, not parsing code

1.require
2.include
3.not using php but only HTML instead
4. Fast templates
5. other?

where I can find a well explained tutorial on this?

View Replies !
Get Localhost - Very Simple
This is a very simple question I think, but I can't find a straight answer from the php documentation. What is the function or variable that I can use to get localhost information?

View Replies !
Simple Script
what i am doing is when a user goes to mysite and let's say that he is looking for a friend. Then he selects gender,country,age(selections). I have three categories to choose. Whatever a user select, the results comes from my database. If the results are 10 datas, it is 2pages.

That's what I am trying to do but I got an error. PHP Code:

View Replies !
Simple Mark-up For CMS
I'm designing/coding a content management system in PHP and am
currently considering how the users will add textual content. I would
like them to be able to use some kind of simple mark-up, like a very
limited subset of HTML, probably with a more friendly naming scheme.
Does anybody have experience of such a thing? I'm thinking an XML
application is the proper answer but when I consider the DTD and
parser it seems like an overkill solution if I'm starting from
scratch.

Does anybody have any advice or suggestions on this? I'm sure it's
been done before but I don't know where to look, is there something
existing I can use or adapt? Has anybody tried this kind of thing
before?

View Replies !
Simple URLs
I want to have a lot of control over my short urls. My site has guitar lessons and articles and I want to have short urls of the form:

mysite.com/guitarlessons-scalelesson.html

The original url is of the form:

mysite/modules.php?op=modload&name=mainlessons&file=index&req=view_fulllesson&lessonid=8

In this case $lessonid 8 refers to scalelesson. All short URL examples I have seen take the original URL and directly translate it. In may case, the short URL scheme would have to query the database. I would like my forum to function similarly. That is, forum posts and forum pages would have forum category and post title in the short URL. Anyone know how to do advacned simple URLs of this sort?

I really like how this forum does short urls actually. I can't imagine this is done with mod_rewrite() since the simple urls appear to be generated dynamically based on database calls.

View Replies !
Simple Redirect?
I've been searching through the forum, and the only solution offered for redirecting to another page seems to be this:

header("Location: http://www.thispage.com ");

Apparently, this doesn't work if it is not in the absolute beginning of the page. My question is the following: Isn't there a more simple command in PHP to tell this simple thing:"Go to this or that page now!".

View Replies !
Simple AJAX Example
Several times some members even me post for simple AJAX example with PHP.
Some of experts will give URL of  tutorial. Now with this attachment I send my simple test of AJAX +PHP with the help of w3schools. There is no alternative to study  good tutorial but this simple example may give the fell of AJAX ...

View Replies !
Some Simple Security
I want to be able to add some simple security to one of my pages, basically
my page allows users to submit a text field which gets parsed into MySQL db
and displayed on other pages. At the moment anyone can submit text which
opens the page to abuse. I don't want to implement a user login system. I
had envisaged the addition of a password entry box which the Submit button
checks against the db before proceeding, so if any user has the correct
password then they can submit.

Having never done password stuff before, could somebody please point me in
the right direction?

Also, if I have the config data to connect to the mysql db in a PHP file on
my server, can anybody just open it?

View Replies !
Simple If Statement
How come this doesn't work?

What am I doing wrong?

$type = $_GET['functionType'];

if ($type == 'Add'){
$AddSQL = "INSERT INTO...";
echo $AddSQL;
}elseif ($type == 'Update'){
$UpdateSQL = "Update ...";
echo $UpdateSQL;
}elseif ($type == 'Delete'){
$DelSQL = "DELETE FROM ...";
echo $DelSQL;
}

View Replies !
Simple Opt-in Script?
I'm looking for a most simple but save opt-in mailing list script in
php (linux Apache CGI, but shouldn't matter)

best:

* all in one single .php file; different functions by input vars /
passwords; config vars on top of script

* uses MySQL or a plain file (still no doubles) next to the .php
(best both options)

* double opt-in not necessary but nice

* good would be "default topic" and at least up to 5 different lists/topic

* takes directly my web forms like email=...&listname=...&sign=in ;
repsonse page can be very simple.

* I can read out the lists plain formatted also by web through the same
..php & password like: cmd=getlist&listname=...&password=...

* hopefully no extreme installation tricks (thus php4, ..)


looking at more than 10x google'd ones, always something was wrong, big
or jerky or not as is should be...

View Replies !
Simple String
Heres my code: Its the result of a simple AJax login form. The problem I am having is with the & sign in the $page variable. Keeps coming up with the following error:

"A semi colon character was expected. Error processing resource " Im sure I just need to escape the & sign but not sure how. Code:

View Replies !
Simple Parser In PHP?
I'm coming to the end of a large and exhausting project, done in my
new favorite language PHP, and its time for a diversion.

I'm wondering if anyone has experience with writing simple parsers. I've
never done it myself, but I know they are not as mysterious as they may
seem, it's a matter of finding the tools.

The idea is to take something like CSS format, except that it allows
nesting, and turn it into associative arrays, such as:

anykey {
property: value;
property: value;
nestedkey {
property: value;
property: value;
}
}

could be processed by a command like:

<?php
$parsed = ParseMyFile(...)
?>

and $parsed would hold the same as if we'd done this:

$arr = array(
anykey("property"=>"value",...

View Replies !
Simple Include
I have an include file called "my_inc_file.php" located in a subdirectly called "inc_files". I have a file both in my root directory, and in another subdirectory called "subdir", that uses the include file. My include is called in a template common to both, so has to have the exact same file structure. My local pc uses Windows, and my remote server uses Linux.

How can I change my include statement so it works for both cases and both operating systems? include_once '/inc_files/my_inc_file.php'

View Replies !
Simple Counter
After a process opened, read and unlocked the counter.txt, some other process would open, read and even write its own count value. So the first process will write a count value less than the right value. And I guess it needs more exception handling codes. Code:

View Replies !
How To I Do A Simple Redirect?
How to I do a simple redirect? I just want people to come to one page and have it automatically kick them to a different page.

View Replies !
Simple Search
I 'm developing a site consisting of 5-10 html/php pages. I want to add
a simple keyword search in my site. I can't seem to find any simple
script, except risearch which can't search my Greek pages (el_GR.UTF-8).

View Replies !
Simple Stuff
i am really getting confused with php's curly brackets ok how do i assign a variable and then assign a value to it from a form parameter send to it..like below if i dont add the @ then i get errors, so how do i assign a value to $actionvar, and if $actionvar is empty then condition ?

If (@$actionvar =="")
{ echo ("<b><FONT COLOR=#804040>Rates in RM</b></font><br><br>");}
else{
echo ("<b><FONT COLOR=#804040>Converted to $cname</b></font><br><br>");}?>

when i doing somthing like this:
<?php
if ($wed =="")
{$wed =="not selected"}?>

it is giving me error in the last "}" why ?

View Replies !
Simple XML Parser
I am trying to write a simple XML parser with PHP. What would be the best way to assign the string/text stored in between <TAG> … and … </TAG> to a variable? The 'content' between the XML tags can have multiple lines and may contain other html tags.

View Replies !
Simple Date
i just want to automatically add a date field to a mysql database everytime an entry is made. the date wont even be used, its just for my reference. i was wondering if i have to do this through php when i submit the other variables to any new table row....or if there is a command to do it in mysql.

View Replies !
Simple Calender
I am developing a very simple calendar that displays links to classes that fall within a given month. To have the page display the current month's classes, I have used: PHP Code:

View Replies !
Simple Ereg Help
I need two ereg expressions in my PHP code. One of them needs to check
that a string only contains letters, and the other needs to check that
the string only contains letters and commas (only one comma at each
time).

I thought that the code for only containing letters would be:

eregi("^([a-z])", $keywords);

But this only appears to be checking the first character.

I also have no idea how to do the one that also allows commas (though
not for lack of trying - believe me!)


So, basically, I want one expression that only lets in letters:
ie. hyasdlhlasdhl but not fhdilfd7800asdads;'

and one expression that only lets in letters and commas (one at a
time):
ie. hasiaks,asdas,adsads but not hdasl,,ahodsa,ads

View Replies !
Simple $variable
I'm trying to fill in a form to insert info into a database. There are two fields to be filled out - one for the root of a thumbnail image, and one for the root of a full-size image. Since the names of the files are always the same, I would like to only fill out one text field in the form and have the code do the rest. Code:

View Replies !
Simple Idea For ERP - Please Help
I'm starting project.First stage is for my school work, but i want to
develop it to the end.

I want to create a ERP based on php for small company's

I want to use as many as possible created opensource applications.

First i need to choose some framework, maybye someone think that php is
not a good idea..I'm waiting for propositions:)

I need to add to this framework some graphic database manager. If it
possible for all databases, but I did't found any ..I want to start with
postgres and mysql., maybye firebird.

Second I have to add soe functionality witch is needed for company
worker, mayby webmail,small cms for documents...

I also need to add sometching for making automatic
documentation.(phpdocumentor ?)

Thats the first stage.I need it in the short time :(

Second i will be developing modules for all departments in small and
medium company.
More details on the webpage(i'm designing it ) and next posts..

View Replies !
Simple Test
Why does this test as not true.

if (!1==2) echo 'true' else echo 'nottrue'

It seems like it should be true.

View Replies !
Simple Question !
I want to know how many entries there is in a table : is there a simple
function to do that ?

By the way, does anyone know how to make an autorun on a CD rom, so that
when the CD is inserted, it opens the user's internet browser (in full
screen if possible).

View Replies !
Simple Php Problem...
I've just started learning some stuff about php and have been
following a couple of tutorials. At the moment I'm stuck with this small
piece of code which gives me an error "mysql_fetch_array():supplied
argument is not a valid MySql result"

<?php
include 'config.php'
include 'opendb.php'

$query="SELECT cname, csubject, cmessage FROM contact";
$result=mysql_query($query);

while($row= mysql_fetch_array($result,MYSQL_ASSOC))
{
echo
"Name :{$row['cname']} <br>" . "Subject : {$row['csubject']} <br>" .
"Message : {$row['cmessage']} <br><br>";
}
include 'closedb.php'
?>

This should just display the content of a table..

View Replies !
Simple Php Queston
I have a multi select pick list in an html

<FORM ACTION="/progs/read.php" METHOD="POST" target="_blank">^M

<label for="CATEGORIES">Select one or more categories</label>^M
<SELECT MULTIPLE name="CATEGORIES" size="10" id="CATEGORIES"
class="select">
<option value="41">Auto Manufacturers</option>
<option value="27">Biodiesel</option>
<option value="38">Component Suppliers</option>
<option value="39">Conversion Companies</option>
<option value="40">Dealers</option>
<option value="28">Electricity</option>
</select>

in read.php i try to read the value by:

$categories=htmlspecialchars($_POST['CATEGORIES']);

then try to print out the value and all I get is the last value.

I tried to put in an array like:

$categories=array($_POST['CATEGORIES']);

and still got the same result.

View Replies !
Simple Sql Join
This is a simple join but I am having trouble with it. I feel like such
an idiot.

I start with this select statement, which works fine:
$query =
"SELECT a.auction, a.winner, b.id
FROM PHPAUCTIONXL_winners a, PHPAUCTIONXL_auctions b
WHERE a.auction=b.id";

Now I only want the results from auctions with ids that are not listed
in the 'archived' field of the PHPAUCTIONXL_archived table. So I added
another table and an AND to the SELECT statement. Now I don't understand
why it doesn't show the auctions which are not archived.

$query =
"SELECT a.auction, a.winner, b.id
FROM PHPAUCTIONXL_winners a, PHPAUCTIONXL_auctions b,
PHPAUCTIONXL_archived c
WHERE a.auction=b.id
AND a.auction !=c.archived";

View Replies !
An AJAX Simple Example For PHP
An AJAX Simple Example for PHP
Article from http://www.joyistar.com
Introduction:
AJAX WebShop 3 Beta2 supports PHP programming by integrating PHP5
development environment. Here we will give an simple example to show
you how to develop web applications by PHP in AJAX WebShop.

1, Notice
We will use Access database in this example. Of course, you can use
others you like. Database name: demo.mdb; Table name: product; Fields:
PRODUCT_ID, PRODUCT_NAME, PRODUCT_PRICE and PRODUCT_AREA.

2, Example
Start AJAX WebShop 3 to new a project by "File->New Project"


Give a project name in the popup window and select the web server as
PHP.

New a PHP Service by "File->New .PHP Service" and input the
required content. Select the "ServiceType" as "Query Data".
Click "OK", WebShop will generate codes automatically.

Input the codes below(Notice: demo.mdb should be the same directory
with the source code files.):
$connstr = "DRIVER=Microsoft Access Driver
(*.mdb);DBQ=".realpath($_SERVER['PATH_TRANSLATED'])."demo.mdb";
$sql = "select * from product";
$sqlcount = "select count(*) from product";

The source code of testquery.php£º
1.Fill data to $xmlRequest in columns:
//fill metadata fields
for ($i=1; $i<=$fields_count; $i++) {
$fieldname = odbc_field_name($result_id, $i);
$datatype = odbc_field_type($result_id, $i);
$xmlRequest->addField($fieldname, $datatype);
}

2. Fill data to $xmlRequest in rows£º
//fill data rows
for ($i=0; $i<$record_count; $i++) {
odbc_fetch_row($result_id);
if($i>=$recNo && $i<$recNo+$maxRows) {
$xmlRequest->append();
for ($j=1; $j<=$fields_count; $j++) {
$xmlRequest->setValueByIndex($j-1, odbc_result($result_id, $j));
}
}
if($i>=$recNo+$maxRows) break;
}
3£®Get the paged parameters, $xmlRequest->recNo is the first record,
$xmlRequest->maxRows is the total records number in a page and to get
the total records number by executing "select count(*) from
product"£º
$sqlcount = "select count(*) from product";
$result_id = @odbc_do($connid, $sqlcount);
if($result_id==null)
throw new Exception($sqlcount);
odbc_fetch_row($result_id);
$record_count = odbc_result($result_id,1);
$xmlRequest->setRecordCount($record_count);
$recNo = $xmlRequest->recNo;
$maxRows = $xmlRequest->maxRows;
if($maxRows==-1) $maxRows = $record_count;
After the steps above, we need a web page to display the result. Select
"File-New Page" and fill the file name.

View Replies !
>> With A Simple PHP Script
I am sure this will be a no-brainer for a lot of you. Put quite simply,
I am looking for a way do a search within a string for all of my HTML
tags. Once it finds those HTML tags, I will like to wrap some code
around it. For example:
<p /> ----> <![CDATA[ <p /> ]]>
<b /> ----> <![CDATA[ <b /> ]]>
<a href="someurl.html"> ----> <![CDATA[ <a href="someurl.html"> ]]>

View Replies !
Simple POST?
Using PHP, what is the simplest and most reliable way to POST variable
data to a URL? This is for data that do not need to be secure.

View Replies !
Simple Arrays
I'm trying to learn php, since it seems to be more efficent
than perl. Could someone show me how I can simply print out every element of
an array, with a newline between each element?

View Replies !
Simple Spider
I reposted this from "Regex within PHP" because I feel this is a PHP lproblem not Regex. And what I am trying to do is start at a pre-defined page, find all the links on that page and run the spider on all of the pages that were found, and return the results from those pages that were spidered. Code:

View Replies !
A Simple IF Condition.
I have a simple IF condition to check whether an entered town name for
a search actually exists in the database.

The form search produces $townsearch

The check should return "Cannot Find The Town" if $townsearch does not
correspond to a recognised townname in the database.

The database is correct, and the SQL query OK.

So why can I type anything in and it accepts it?

(Day 4 of learning PHP)

<?php $townsearch = $_GET['town']; ?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<input type="text" name="town" size="20" value="<?php echo $townsearch;
?>" />&nbsp;
<input type="submit" value="GO" />

<?php
$check = @mysql_query ("SELECT townname FROM site01_towns WHERE
townname='$townsearch'");
if (!$check)
{
echo '<p>Cannot Find The Town</p>'
exit();

}

?>

View Replies !
Simple Blog
Do you know anyway I can make a very simple blog eg a script for writing to the mysql and a script for reading from it?

View Replies !
GD Error. Simple Fix?
So im working on a dynamic signature script, by pulling halo 3 stats off bungie.net and applying them to an image and cacheing the image. Code:

View Replies !
Simple Array
Running some queries and get an array returned that looks like this:

Array ( => Array ( [max] => 4 ) )
Just wondering how to access '4'. Been trying simple echo commands (echo $maxID; echo $maxID[0]; echo $maxID[1]; echo $maxID['max']; but cant get anything. Obviously its something stupid im not realizing, just need a shove in the right direction.

View Replies !
XSS In Simple Script
We have a simpel PHP script that is designed to only include the body portion of a page when doing a server side include. The dilema is it is failing our security audit to to an xss issue. Code:

View Replies !
Simple Function
Hello, I'm running a blog powered by Wordpress. In my header, there is a simple function that returns a random masthead, like this:

function header_graphic() {
echo "/images/";
$num=rand(0,1);
echo "masthead".$num.".jpg";

This (obviously) returns masthead0.jpg, masthead1.jpg, randomly. My question is, is there a simple way I could modify this so that I could create my mastheads in a variety of graphics formats? For example, make the function randomly return one of masthead0.jpg, masthead1.png, or masthead2.gif? JPG doesn't suit all my graphics the best...

View Replies !
Simple Newsletter
I have made a simple newsletter for one of my customers, and have recently found out that it does not allow html. I am sure it should.. here is the code:

View Replies !
Simple Addition?
I am trying to basically add 2 numbers together but my math skills are lacking when it comes from reading a database. I am not 100% sure I undersdand the code here so bear with me. Code:

View Replies !
Simple PHP Redirect
Does anyone know how to redirect a user to a specific page based on a login?
Essentially, there are only 3 separate pages involved, ie bob, sue and mary's.
When they enter their username and password I want them to be redirected to the appropriate corresponding page.

This is the code I have below, but I am getting a parse error on line 11 (which is just a curly bracket -if the syntax was wrong i would have thought the parse error would be earlier on in the script).
Any suggestions? Code:

View Replies !
Simple Cookie
I'm working on a log in system... an every time a user refreshes the admin panel within a period of 5 minutes i use the setcookie again.. just to update the time... but something weird just happened...

it suddenly stopped working... then I tried deleting all cookies from my computer, and then it suddenly worked again... should I delete the cookies and then set them again?

View Replies !
Simple Exec
I want to pass a value to a php file I'm exec'ing.

Parent File has
   myValue= 100;
   exec("/usr/bin/php ./child.php?myVariable=$value > /dev/null 2>&1 &");

Child File
  ReceivedValue = $_REQUEST['myVariable'];

Child File is not obtaining the value...am I not passing the argument correctly?  Is there a better way to ship/receive arguments in this scenario?

View Replies !
Simple Graph
I am making a MMORPG and I need a really simple graph for showing how much unit next level up health and so on. I have searched the web and all I can find is really complicated line graphs or bar graphs that have more then one bar or lines.

I just need to be able to make the bar so say i had 50/100 health it would be 50% full. Any help to point me in the right direction would be great because i have no idea how to do this otherwise.

View Replies !
Simple Regex
Can anybody tell me why this simple regex doesn't work:

$comment = htmlentities($_POST['comment']);
   if (preg_match("/</", $comment)) {  print 'string is NOT OK!'; } else {  print 'string is  OK!'; }

This if statement works if I substitute < with another character.

View Replies !
Simple Php Function
I need a very simple piece of php code that does the following:

INPUT: a string - let's say $a

1. open a .txt file, check if the file already contains a line that equals $a and if so echo on the screen "contains $a" 2. if not, add $a to the end of the file on a new line .

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved