...

View Full Version : php form help!



puja
04-24-2006, 01:01 PM
hi
Ive implemented edit details function but how it works is that when i view the records, there is a link to edit that particular record.
Now that all works fine but when it shows the edit details form, it is empty, is there a way that i can get it to display the information that the record already has and then they can just edit it accordingly rather than having to input all the information again, even the stuff that is already correct?
thanks

raf
04-24-2006, 01:13 PM
could you post the code that you use to build and populate the edit-form?

puja
04-24-2006, 01:30 PM
yeh of course
the form part looks like:

echo '<h2> Edit Customer </h2>
<form action = "edit_cust_details.php" method = "post">
<p>User Name: <input type="text" name ="user_name" size="15" maxlength="15" value"' .$row[0] . '"/></p>
<p>First Name: <input type="text" name ="first_name" size="15" maxlength="15" value"' .$row[1] . '"/></p>
<p>Last Name: <input type="text" name ="last_name" size="15" maxlength="15" value"' .$row[2] . '"/></p>
<p>Email: <input type="text" name ="email" size="15" maxlength="15" value"' .$row[3] . '"/></p>
<p><input type="submit" name="submit" value="Submit" /></p>
<input type="hidden" name="submitted" value="TRUE" />
<input type="hidden" name="user_name" value="' . $id . '" />
</form>';

thanks

raf
04-24-2006, 02:11 PM
and could we also see the code you use to select the data from the db?

puja
04-24-2006, 04:19 PM
hey
its ok i've solved the problem now
all i needed to do was put an = after the word value!
thanks neway

puja



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum