Jump to content

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

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.