how to denie .exe file and other weird stuff in my form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GK
Forum Commoner
Posts: 51
Joined: Sat Jun 07, 2003 2:58 pm
Contact:

how to denie .exe file and other weird stuff in my form

Post by GK »

Hi all

How can i denie sertain worths or .exe names from submitting to my form?
I prefer a seperate file that includes bad worths

<?
include "config.inc";
include "connect.php";

if (!isset($submit)) {
if(!eregi("^http://.+\..+", $file)){ die("Geen scan url of domein"); }
$get_rows = mysql_db_query ($dbname,"Select * from checker Where sid='$sid' OR file='$file' OR domein='$domein'",$db) or die (mysql_error());

$count = mysql_num_rows($get_rows);

if ($err) {

}

else {

mysql_db_query ($dbname,"Insert into checker (sid,file,domein) values ('$sid','$file','$domein')",$db) or die (mysql_error());

$msg = "Toegevoegt.";

}


if ($auto_validation == "no") { $msg = "Toegevoegt."; }

else { $msg = "Toegevoegt."; }
}

?>
<? echo $msg; ?>
Post Reply