i tried getting the values into vars using fetch_array/fetch_object and fetch_row and tried to put them in variables but for some odd reason it really doesnt work because when i try to use the vars in the value section instead of printing in the edit box the content of the variable i usually end up with "?>", ">", "<?php", or "}?>" instead... any reason this shows up? and when i do: echo "<input type=text name=$name value='$new_var'>"; then on the web page i end up with some thing like this instead of the edit box: ">";;"> }?> any reason for that?
how would i get the content into vars from the table? guess thats the main problem right now ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 01, 2003 4:28 PM Subject: Re: [PHP] using <input> tags with php > In a message dated 2/1/2003 12:52:24 PM Pacific Standard Time, > [EMAIL PROTECTED] writes: > > >i want to set up a form that will load values from a table and make them the > >"value" of the edit box... then when people press an update button then all > >of the stuff that changes from the record already in the table gets > >changed... anybody know how to make it where you can get the values out of a > >table and make them the default value of a input field...? > > Basically, get your field values from the database and put them in variables. > Then use the variables in your form. For instance, > > echo "<input type='text' name='first_name' value='$first_name'>"; > > Then, in the script that processes the form, update the database record with > the values that were passed from the form. > > Janet > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php