Hello, can anyone tell me why this php word trap fails to work,
and the trigger words get blow right past, and the comments get posted anyway?
heres the php code im testing on a server.
<?php
$words = array(
'murmer',
'frog',
'bat',
);
$continue = true;
foreach ($words as $word) {
if (preg_match('/b' . $word . 'b/i', $post)) {
$continue = false;
exit();
}
}
if (!$continue) {
// Bad boy!
}
else {
// Post message
}
$fc = fopen("comments.txt","a+b"); //opens the file to append new comment -
fputs($fc,$_POST['comments']."nnnNewComment->"); //writes the comments followed by a
fclose($fc); //closes the files
if(sizeof($_POST)) {
$body = "";
while(list($key, $val) = each($HTTP_POST_VARS)) {
$body .= "$key: $val n";
}
mail("myemail@myemail.com", // to
"Subject Line",
$body);
header("Location: mysite.html");
}
// end form processing
?>
Sending a hyperlink through mail
HI all,
a very simple php header question (sorry!)
Firstly...I do apologise if this annoys anyone....a header errorI'm do not know php & have tried removing all "white space" but I cant seem to stop the error displaying.Its a very
How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But, when the person comes to buy the ticket, I have to replay to my process page which ticket they
for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain data.Please have a look.Code: function add_user_to_db() {
Help me with some material on Open Text Overview.
Hi Experts,
quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows
Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I get the following error:Code: $username='far'; $password='c00lfarus3r@'; $database='far';Warning:
foreach iterator
Hi GuysDoes the foreach loop have an inbuilt iterator ?
Calling a Procedure with IN & OUT Parameters
Hello,
Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I want to insert:Code: <?php echo $my_twitter_username; ?>Into this code:Code: