PHP and mysql (and dreamweaver)
I have one form text field "animal", that when filled out and sent to the database needs to fill two database fields "animal" and "animal2".
How can I set this up in my form?
many thanks
Jim
You'll have to give more details.
HTML form has a field? okay
The form field is passed into php when the form is posted? okay
That value needs to be stored in two different database fields? okay, store it in both, what's the problem?
$query = "INSERT INTO yourtable (animal, animal2) VALUES ($var, $var)"; $q = mysql_query("$query");
Assuming that you're using mysql, although the INSERT syntax is the same. $var is the same both times it is used. This help?
Matt