Im trying to pull an email out of my database email field but I keep receiving this error:
Error performing query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '@hotmail.com' at line 1
Here is my select statement:
PHP Code:
if(isset($mailPass)){
$mailPassResult = mysql_query("Select * from member where email = $email");
if(!$mailPassResult){
echo("<p>Error performing query: ".mysql_error()."</p>");
exit();
}
while($passViewRow = mysql_fetch_array($mailPassResult)){
$email_address = "[email=seanmayhew@hotmail.com]seanmayhew@hotmail.com[/email]";
$passViewRow["email"];
$password = $passViewRow["password"];
Here is the form that I am submitting:
Code:
<form action="mailpass.php" method="post" class="chartText">
<table width="400" border="0" align="center">
<tr>
<td> <div align="right" class="FormText">Email Address: </div></td>
<td><div align="left">
<input type="text" class="FormText" name="email">
</div></td>
</tr>
<tr>
<td> <div align="right"></div></td>
<td><div align="left">
<input type="submit" name="mailPass" value="Send">
</div></td>
</tr>
</table>
</form>
Any help would be greatly appreciated.
Bookmarks