On Feb 26, 2008, at 8:55 AM, Henry Felton wrote:
I'm just getting into PHP at the moment and was wondering; what code
need to look at a field value entered in a form, then if that value
in my table, enter all the other information entered in the form, to
other fields on that record.
Basically, what I'm trying to do is give a load of users an individual
password that they enter, with various other pieces of information
year of birth, single/married or whatever, into a form. In MySQL I
table with three fields, but only the password one has any data in
script will then took in the table to find the password entered in
and then append all the other information (i.e. data for the other two
fields) to the particular record that holds the password value
Hope that made sense, but I'd be so grateful if someone could help
What you're looking for to me sounds like using the UPDATE syntax in
MySQL... something along the lines of:
$sql = "UPDATE tablename field1="$MySuperData1" field2="$MySuperData2"
Of course, this is untested check the mysql site for specifics on
using update. Also... always be sure to escape your data or you are
asking for trouble...
That should be enough to get you started!
3251 132nd ave
Holland, MI, 49424-9337
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php