Help with SQL Statement.

admin

Administrator
Staff member
I am trying to get a form to email out a password to a member if they forget it. My input html looks like this.

<input type="text" name="form" value=http://www.phpbuilder.com/board/archive/index.php/"">

Then I check if that email is in the database and if so I want to query the database and mail out the password for that entered email. This sql produces an error in mysql and I don't understand why. What am I doing wrong?

$query = mysql_query("SELECT password FROM login WHERE email = $form[email] ");
list($password) = mysql_fetch_row($query);

then mail out $password.
 
Back
Top