Re: match
| From: | David Yee | Date: | Sat, 05 Jan 2002 02:52:34 +0000 |
| Subject: | Re: match | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-15429@lists.php.net to get a copy of this message | ||
If you're trying to prevent HTML tags from being submitted then try
htmlentities($your_variable). That'll convert for example <pre> to
<pre>.
David
----- Original Message -----
From: "louie miranda" <louie@chikka.com>
To: <php-db@lists.php.net>
Sent: Friday, January 04, 2002 6:22 PM
Subject: [PHP-DB] match
> 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 #####################
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>