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/xmlrpc class issue
I am working on xml-rpc in php to start with.I have a class that only has variables defined in it. I have defined an object to this class. Now what i want to do is that i want to send a 'true copy' of
need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the problem with this is when i send an attachment it does to the specified address but that email is
Displaying image pathname instead of image
HelloIm trying to upload and then display images from a mysql database - Its only basic and i only need one pic per user on the database hence why using mysqlI really need osme help as ive been going
Transform value 0 in no and 1 in yes help needed
Hello,I have this in the table: "value" type int 0 to represent false and 1 to represent true. everything works great in display to the user end it sees 0 or 1 i want to replace the 0 to
Logic question
im wondering what's the best method to do the above list:it is for alliance @ MMORPG game -the administrator of alliance have 10 slots for creating ranks ... each rank have it's own permissions (in
session checking in page load
hai all
Typing math
I've added support for typesetting math using LaTeX on the forums.Example:Code: [Select][tex]\sum_{n = 0}^\infty \frac{1}{n!} = \lim_{n\to\infty} \left(1+\frac{1}{n}\right)^n = e[/tex]Outputs:Just in
Redirect not working after making a POST/GET
Hi Everyone,I am a novice in PHP. Here I have 2 pages, one page with a textbox and button and other page which has code to redirect to another website with the post value as querystring. When I tried
Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and string function don't seem to work because they consider the Greek alphabet letters as part of the A-Z
Change log of Cost centre change in Plant maintenance order
Hi,