jesseainskeep
07-11-2007, 11:41 AM
As of now, I have a form people fill out that then generates an email and sends it to me. I take the info, go to the CMS I created, key in (copy and paste) the information in and it goes to the website.
I want to take the form and have it send to a holding table, so I can view the records on the holding table and then just move them over to the live table, if this makes sense, but I'm worried about a hacker being able to dump my tables or causing problems.
On the validate page, after the form is submitted, here is what I have....
if($_SERVER['HTTP_REFERER'] == "http://mysite.com/form"){
foreach ($_POST as $key=>$val){
$_POST[$key] = strip_tags($val);
$_POST[$key] = htmlspecialchars($val);
$_POST[$key] = addslashes($val;)
}
//Do other hygiene and submit to database from here.
}else{
echo "Error";
}
Now I'm mostly just worried about SQL Injections. Someone hacking the database and things like that. How secure does this look?
I want to take the form and have it send to a holding table, so I can view the records on the holding table and then just move them over to the live table, if this makes sense, but I'm worried about a hacker being able to dump my tables or causing problems.
On the validate page, after the form is submitted, here is what I have....
if($_SERVER['HTTP_REFERER'] == "http://mysite.com/form"){
foreach ($_POST as $key=>$val){
$_POST[$key] = strip_tags($val);
$_POST[$key] = htmlspecialchars($val);
$_POST[$key] = addslashes($val;)
}
//Do other hygiene and submit to database from here.
}else{
echo "Error";
}
Now I'm mostly just worried about SQL Injections. Someone hacking the database and things like that. How secure does this look?