Jump to content

cant select @emial.com


corillo181

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..
Link to comment
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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.