Help on updating table

Ok, Basically this is what im aiming for. The user is brought to a page where they see a form, the form consist of a field called username and HIDDEN field called active with the values “yes”. On the table the columns are (username, active) username being w/e they registered for and active with the values “no”. So on the form they fill out there username and hit submit, once they hit submit the hidden field active with the values “yes” updates the table active from “no” to “yes” with out them knowing. I want this to work for w/e user enters there username. So i dont want to update the whole column/or row. Sorry if you can’t understand me ill try to explain it better if I have to.

$SQL = “UPDATE table SET active = ‘Yes’ WHERE username = '”.$_POST[‘username’]."’ ";

Sponsor our Newsletter | Privacy Policy | Terms of Service