Jump to content


Photo

cant select @emial.com


  • Please log in to reply
2 replies to this topic

#1 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 26 May 2006 - 08:43 PM

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

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

<?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";
}
}
?>



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

#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 26 May 2006 - 09:28 PM

you gotta include your email in '' so mysql won't try to read it as commands.
$checkemail=mysql_query("SELECT `password` FROM `user` WHERE `email`='$email'")or die(mysql_error());

NoGray.com


#3 corillo181

corillo181
  • Members
  • PipPipPip
  • Advanced Member
  • 896 posts

Posted 26 May 2006 - 10:13 PM

what do you mean put the ' ' dat doesn't make a diifference.. and still gives me the same error




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users