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
?>
PHP Code / Script To check weather the given email exists in a domain
Hi,I want to implement the following in my web pagein sign up we will ask to enter user existing email id , so now i need to check weather the entered email currently available are not without sending
"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql query... But this time i'm working with an array...so i have an array that looks like thisCode:
Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists in the database to logging in. I used $_SESSION['username']=$myusername; However, when I log-out,
help with database debug pls
Parse error: syntax error, unexpected T_ELSE in /home/content/m/e/s/mesick/html/students/05/php/checklogin.php on line 13<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder which i can then change the name of it but however i create a thumbnail of 140 width and 130 height
Open browser page depending on XML results
Hello,I have some PHP code that sends webbased from data to an external url ( in the form of an XML data stream ) , and gets an XML data stream back.I've got it displaying the stream via the browser (
Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontpage. It's a good system, but it's got a few flaws, an example being that it counts
Expandable Post Code
Hi,Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so its all just plain html and php coding. I have a page that displays short news articles of about 25 30 words
Retreiving objects from Sessions
Hi all,I am getting really frustrated with storing and retreiving objects from a session. But it may be because of my lack of knowledge in sessions First some system specs:OS - Vista Home
Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,The code below works great. It creates a table that shows the 25 most recently added tables to a MySQL database called "sitefeather."Each one of these tables has the following