Jump to content
MakeWebGames

Recommended Posts

Posted

Hello I am trying to protect my login sequence from sql injections but am getting an error. I have changed this:

if ($_POST['username'] == "" || $_POST['password'] == "")
{

 

To This:

if mysql_real_escape_string($_POST['username'] == "")) || mysql_real_escape_string($_POST['password'] == ""))
{

 

and m getting this error:

Parse error: syntax error, unexpected T_STRING, expecting '(' in /verify.php on line 3 Can someone please help me with this, Line 3 is the long line.

Posted
$_POST['username'] = mysql_real_escape_string($_POST['username']);
$_POST['password'] = mysql_real_escape_string($_POST['password']);
if mysql_real_escape_string($_POST['username'] == "") || mysql_real_escape_string($_POST['password'] == "")
{

wow

maybe:

$_POST['username'] = mysql_real_escape_string($_POST['username']);
$_POST['password'] = mysql_real_escape_string($_POST['password']);
if ( $_POST['username'] == "" || $_POST['password'] == "" )
{
Posted

He owes me $520 and scammed me, now will not even reply, so now he wants his login secure lol.

I already messaged him how but guess he is just a noob, really though we would have made a great game if he never scammed me.

Vegas I still want that money, please give it to me, I atleast want $100 at the least.

Posted
$_POST['username'] = mysql_real_escape_string($_POST['username']);
$_POST['password'] = mysql_real_escape_string($_POST['password']);
if ($_POST['username'] == "" || $_POST['password'] == "" ){

 

Then you tell them to fill out both forms then you check if it matches what is in the database. You should really know this.

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.   Paste as plain text instead

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