/ Published in: PHP
Expand |
Embed | Plain Text
$host=$p11server; // Host name $username=$p11username; // Mysql username $password=$p11password; // Mysql password $db_name=$p11database; // Database name $tbl_name="users"; // Table name // Connect to server and select databse. // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; // Mysql_num_row is counting table row // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to correct location } else { }
Comments
Subscribe to comments
You need to login to post a comment.

I was reading through this and when I got to line 29 and read the comment I wondered why it said that it was pointing towards login_success.php when the two headers point to main.php & index.php?messalert=pw.
I was reading through this and when I got to line 29 and read the comment I wondered why it said that it was pointing towards login_success.php when the two headers point to main.php & index.php?messalert=pw.
This was hacked up from something else back in the day and I took my own spin on it. I took that out. Good eye.