Jump to content

Archived

This topic is now archived and is closed to further replies.

corillo181

cant select @emial.com

Recommended Posts

why does myquery says " PROBLEM HEAR '@WHATEVER.COM"

it doesn't select after the @ sign?????????

[code]
<?php
include_once'../includes/db.php';
include_once'../includes/header.php';
$email=$_POST['email'];
$email=stripslashes($email);
if($email==""){
echo "please enter your email";
include'../htmlforms/lost_pw.html';
}
$checkemail=mysql_query("SELECT password FROM user WHERE email=$email")or die(mysql_error());
while($mail=mysql_fetch_array($checkemail)){
$password=$mail['password'];
$username=$mail['username'];
if(!$checkmail){
echo"that email is not a active email";
include'../htmlforms/lost_pw.html';}else{
$subject=" your lost password";
$message=" hello this is your lost password

password=$password

keep your password in a safe place..

This is an automated response, please do not reply!";
mail($_POST['email'],$subject,$message);
echo "your password has been sent";
}
}
?>
[/code]



else if some one puts something like hi i'm .. the ' is a problme i thought stripslashes would help..

Share this post


Link to post
Share on other sites
you gotta include your email in '' so mysql won't try to read it as commands.
[code]
$checkemail=mysql_query("SELECT `password` FROM `user` WHERE `email`='$email'")or die(mysql_error());
[/code]

Share this post


Link to post
Share on other sites
what do you mean put the ' ' dat doesn't make a diifference.. and still gives me the same error

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.