bug in script
But recently found a bug in there that lets them subit the iteam even if its
blank.
I've think I've figured a way around this.
The script below is what should stop this.
Whould this work? or am I going about it the wrong way? <?php
if $_GET[] == '' { print (Please full all parts of the form out.<br> Please
go back and try again.);
} else { include ("phplinksconfig.php");
mysql_select_db($database,$connect);
$sql = "INSERT INTO phpLinks (`id`, `name`, `site_name`, `url`, `category`,
`comment`) VALUES ('', '$_POST[name]', '$_POST[site_name]', '$_POST[url]',
'$_POST[category]', '$_POST[comment]')"; if (mysql_query($sql,$connect)) {
echo "your input as been entered<br>";
echo "<a href=\"http://$site\">Click here</a> to retun to the main
page.<br>\n"; } else {
echo "There was an error, please try again later<br>";
echo "<a href=\"addlink.html\">Click here</a> to try again.<br>\n";
echo "or <a href=\"$site\">Click here</a> to retun to your homepage.<br>"; }
?>
--
Best Regards
Dark Angel
--------------------------------------------------------------------------
http://www.stateofmind.me.uk - My Home Page
http://www.keir.net/k9.html - Free spam filter for windows
http://www.shrine2aeris.co.uk - My shrine to Aeris from FF7
|