Jump to content

User Login Security...


phpSensei

Recommended Posts

K I have posted this before, and I already validated the input before the mysql_real_escape_string..

 

Just Want to know if there is anything else I can add to my script to make this login more secure.

 

<?php

$dbhost="localhost";
$dbuser="root";
$dbpass="";
$dbname="dbase";

$connect=mysql_connect($dbhost,$dbuser,$dbpass) or die("Error: " . mysql_error());
$db=mysql_select_db($dbname);


$username=mysql_real_escape_string($_POST['username']);
$password=mysql_real_escape_string($_POST['password']);>


$query_bad = "SELECT * FROM member WHERE username = '$username' and password ='$password'";
echo "Escaped Bad Injection: <br />" . $query_bad . "<br />";

Link to comment
https://forums.phpfreaks.com/topic/63565-user-login-security/
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.