Re: using <input> tags with php
| From: | Sunfire | Date: | Sat, 01 Feb 2003 22:07:25 +0000 |
| Subject: | Re: using <input> tags with php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133924@lists.php.net to get a copy of this message | ||
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: <janet@valade.com>
To: <php-general@lists.php.net>
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,
> rusty_81@msn.com 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