match
| From: | louie miranda | Date: | Sat, 05 Jan 2002 02:22:26 +0000 |
| Subject: | match | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15427@lists.php.net to get a copy of this message | ||
Hi is it possible to match a certain string when a user submit's a form
I mean, ex: i put "<pre>" on a form field, and php will match it and example
deny it, oh well.. im new sorry.. :)
thank you
mysql_query ("INSERT INTO members (ircname, email, realname, asl, info)
VALUES
('$ircname','$email','$realname','$asl','$info')
");
# form.php ######################
<?php
mysql_connect ('my_db_host','my_user','my_pass');
mysql_select_db ('my_db');
mysql_query ("INSERT INTO members (ircname, email, realname, asl, info)
VALUES
('$ircname','$email','$realname','$asl','$info')
");
print ($ircname);
print (" ");
print ("<p>");
print ("Thanks for joining!");
?>
# form.php ######################
# form.html #####################
<html>
<body>
<form action=form.php method=GET>
Ircname: <input type=text name=ircname size=25 maxlength=25><br>
Email: <input type=text name=email size=25 maxlength=25><br>
Realname: <input type=text name=realname size=25 maxlength=25><br>
A/S/L: <input type=text name=asl size=25 maxlength=25><br>
Info: <input type=text name=info size=25 maxlength=25><br>
<p>
<input type=submit>
</form>
</body>
</html>
# form.html #####################