| View previous topic :: View next topic |
| Author |
Message |
OSIRIS Grandmaster Cheater
Reputation: 0
Joined: 27 Aug 2006 Posts: 654
|
Posted: Sat Oct 11, 2008 7:35 pm Post subject: How do I block certain words from my guestbook? |
|
|
| Code: |
<?php
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("website") or die(mysql_error());
$comment = $_POST[message];
$name = $_POST[name];
echo "<h1><center>Message Submited.</center></h1>";
mysql_query("INSERT INTO message
(name,message) VALUES('$name','$comment') ")
or die(mysql_error());
?>
<meta http-equiv="refresh" content="1; URL=guestbook.php"> |
Like just for an example how would I stop the word "sex" from appearing?
I think I would have to use the if command something like this, but im not sure.
| Quote: | if ($_POST[message] == "sex")
window.location = /guestbook.php
else
<?php
mysql_connect("localhost", "samsung", "dildo#s") or die(mysql_error());
mysql_select_db("website") or die(mysql_error());
$comment = $_POST[message];
$name = $_POST[name];
echo "<h1><center>Message Submited.</center></h1>";
mysql_query("INSERT INTO message
(name,message) VALUES('$name','$comment') ")
or die(mysql_error());
?>
<meta http-equiv="refresh" content="1; URL=guestbook.php">
|
|
|
| Back to top |
|
 |
Lorrenzo Moderator
Reputation: 4
Joined: 02 Jun 2006 Posts: 3744
|
|
| Back to top |
|
 |
Ihazanidea Cheater
Reputation: -1
Joined: 24 Aug 2008 Posts: 36 Location: In an underground bunker with large amounts of liquor and women.
|
Posted: Sat Oct 11, 2008 7:37 pm Post subject: |
|
|
Stephon....First you complain about the site now your helping people with it....thats weird...But good for you you figured something the probably no ones gonna use...and if ya do you found something..
_________________
▲
▲ ▲ ← Learn to do it. |
|
| Back to top |
|
 |
|