Jump to content

Query failed


rainprop

Recommended Posts

hi,

when i try to preview the page, this message appears. how do i solve it?

is there any mistake in the input of the codings?

basically i just copied the codings from the internet. but there are some chnges that i did. i duno which one is rite or wrong.

 

$qry="SELECT * FROM `user` WHERE login='login' AND password='".md5($_POST['password'])."'";

$result=mysql_query($qry);

 

if($result) {

if(mysql_num_rows($result) == 1) {

//Login Successful

session_regenerate_id();

$member = mysql_fetch_assoc($result);

$_SESSION['SESS_USER_ID'] = $member['user_id'];

$_SESSION['SESS_EMP_NAME'] = $member['emp_name'];

session_write_close();

header("location: member-index.php");

exit();

}else {

//Login failed

header("location: login-failed.php");

exit();

}

}else {

die("Query failed");

}

?>

Link to comment
https://forums.phpfreaks.com/topic/194684-query-failed/
Share on other sites

SORRY...pls don mistake me...the assignment is not due tomorrow..

it has still got 3 weeks left.

but as im redoing it, i tend to have a lot of problem.previously i used the dreamweaver to create the designs where it has helped me to generate the php codings by itself, but now im trying to generate the design woth the php codings..

Link to comment
https://forums.phpfreaks.com/topic/194684-query-failed/#findComment-1024083
Share on other sites

Archived

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

×
×
  • 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.