Re: [PHP] I'm not sure how to do some simple code...
Have a look around: http://www.php.net/strip_tags Regarding simple matches, consider: http://uk.php.net/stristr And who knows, maybe you want: http://us.php.net/htmlspecialchars Learn about if/else: http://au.php.net/else Regards, Philip Olson On Fri, 25 Jan 2002, Leif K-Brooks wrote: > I know this is probably a stupid question, but how do I make it so that if a > string contains the word "script" (I'm banning javascript) it does > something? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I'm not sure how to do some simple code...
Whoops, that should be: $mystring = "This is a string with the word script in it"; if(eregi("script",$mystring)){ //do something here } - Original Message - From: "Mike Maltese" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 25, 2002 8:41 PM Subject: Re: [PHP] I'm not sure how to do some simple code... > > } > > > - Original Message - > From: "Leif K-Brooks" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 25, 2002 8:12 PM > Subject: [PHP] I'm not sure how to do some simple code... > > > > I know this is probably a stupid question, but how do I make it so that if > a > > string contains the word "script" (I'm banning javascript) it does > > something? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I'm not sure how to do some simple code...
$mystring = "This is a string with the word script in it"; if(eregi("script",$mystring){ //do something here } - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 25, 2002 8:12 PM Subject: [PHP] I'm not sure how to do some simple code... > I know this is probably a stupid question, but how do I make it so that if a > string contains the word "script" (I'm banning javascript) it does > something? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] I'm not sure how to do some simple code...
I know this is probably a stupid question, but how do I make it so that if a string contains the word "script" (I'm banning javascript) it does something? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]