Jump to content

Recommended Posts

  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

<?php

$pass1= trim(mysql_real_escape_string(strip_tags(htmlspecialchars($_POST['pass1']))));
$pass1.= md5($pass1);

 

Why are you doing all this sanitizing? What could possibly break md5 function?

I can't really understand what's happening here...

 

ive got a bunch of errors on my script, changes i made that worked and stopped working with the injection thing so i have to remake the whole thing from the original code

 

ill let u guys know when i remake the site from the original code and implement the new code

 

 

thing is, which might be why the data still gets inserted in that the addeal page submits info to another script page, and THAT script page sends the code. so im applying the code to the second page, that actually send the data, not to the addeal page itself

 

addeal:

<form method="post" action="adddealscript.php">
<input type="text" name="ref" size="30" />
<input type="submit" value="Add Deal!" />

 

adddealscript:

$ref = trim(strip_tags(mysql_real_escape_string(htmlspecialchars($_POST['ref']))));
if(!empty($ref)) { 
sql INSSERT
}else { //error
}?>

 

$ref = trim(strip_tags(mysql_real_escape_string(htmlspecialchars($_POST['ref']))));

$ref2 = trim(strip_tags(mysql_real_escape_string(htmlspecialchars($_POST['ref2']))));

$ref3 = trim(strip_tags(mysql_real_escape_string(htmlspecialchars($_POST['ref3']))));

 

if(isset($ref)||!empty($ref)||isset($ref2)||!empty($ref2)||isset($ref3)||!empty($ref3)) {

//insert

}else{

//error

}

 

 

 

 


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