Full Code:
http://www.habboxforum.com/showthrea...wpost&t=204001
By Mentor
Full Code:
http://www.habboxforum.com/showthrea...wpost&t=204001
By Mentor
PHP Code:[LEFT]<?[/LEFT]
[LEFT]$name = $_GET['name'];[/LEFT]
[LEFT]echo "Hi, your name is $name";[/LEFT]
[LEFT]?>[/LEFT]
[LEFT][/LEFT]
Where would i put that though? When you post it tell me which code to post and then you can add it to the code.
addtag.php is the code we need
Last edited by Colin-Roberts; 09-08-2006 at 02:19 PM.
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
In addtag.php put
then putPHP Code:function filter($message)
{
$bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
foreach ($bad_words as $naughty)
{
$message = eregi_replace($naughty, "****", $message);
}
return $message;
}
Add me on msn, *Removed*PHP Code:$input = "$message";
$output = filter($input);
echo $output;
A4AOwen (Forum Moderator) - Please do not post your personal information.
Last edited by A4AOwen; 09-08-2006 at 05:52 PM.
PHP Code:[LEFT]<?[/LEFT]
[LEFT]$name = $_GET['name'];[/LEFT]
[LEFT]echo "Hi, your name is $name";[/LEFT]
[LEFT]?>[/LEFT]
[LEFT][/LEFT]
Someone add it to this please
PHP Code:<?php
$name = $_POST['name'];
$website = $_POST['website'];
$message = $_POST['message'];
if(empty($name) OR empty($message))
{
echo "
<script language='javascript'>
alert('You need to fill out both of the form fields...');
</script>
";
}
else
{
echo "
<script language='javascript'>
alert('Thanks for your message $name...');
</script>
";
$name = htmlspecialchars($name);
$message = htmlspecialchars($message);
$tag = ("<font size=\"1\" face=\"Verdana\">
<b>$name</b>: $message </font><br><br>");
$read = fopen("content.txt", "r");
$contents = fread($read, filesize('content.txt'));
fclose($read);
$write = fopen("content.txt", "w");
fwrite($write, "$tag $contents");
fclose($write);
}
print "<meta http-equiv=\"refresh\" content=\"0;index.php\">";
// Copyright 2006 - 2007 PixelResources
?>
function filter($msg)
{
$bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pe a" );
foreach ($bad_words as $naughty)
{
$msg = eregi_replace($naughty, "****", $msg);
}
return $msg;
}
you don't need the php codes fujit unless you were tryi ng to do php code box.
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
i think its this.
PHP Code:<?php
$name = $_POST['name'];
$message = $_POST['message'];
if(empty($name) OR empty($message))
{
echo "
<script language='javascript'>
alert('You need to fill out both of the form fields...');
</script>
";
}
else
{
echo "
<script language='javascript'>
alert('Thanks for your message $name...');
</script>
";
$name = htmlspecialchars($name);
$message = htmlspecialchars($message);
$tag = ("<font size=\"1\" face=\"Verdana\">
<b>$name</b>: $message </font><br><br>");
function filter($name)
{
$bad_words = explode(',', "****,****,ect" );
foreach ($bad_words as $naughty)
{
$msg = eregi_replace($naughty, "****", $name);
}
return $name;
}
function filter($message)
{
$bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
foreach ($bad_words as $naughty)
{
$msg = eregi_replace($naughty, "****", $message);
}
return $message;
}
$read = fopen("content.txt", "r");
$contents = fread($read, filesize('content.txt'));
fclose($read);
$write = fopen("content.txt", "w");
fwrite($write, "$tag $contents");
fclose($write);
}
print "<meta http-equiv=\"refresh\" content=\"0;index.php\">";
// Copyright 2006 - 2007 PixelResources
?>
Last edited by Colin-Roberts; 09-08-2006 at 02:27 PM.
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
PHP Code:<?php
$name = $_POST['name'];
$website = $_POST['website'];
$message = $_POST['message'];
if(empty($name) OR empty($message))
{
echo "
<script language='javascript'>
alert('You need to fill out both of the form fields...');
</script>
";
}
else
{
echo "
<script language='javascript'>
alert('Thanks for your message $name...');
</script>
";
$name = htmlspecialchars($name);
$message = htmlspecialchars($message);
$tag = ("<font size=\"1\" face=\"Verdana\">
<b>$name</b>: $message </font><br><br>");
function filter($tag)
{
$bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
foreach ($bad_words as $naughty)
{
$tag = eregi_replace($naughty, "****", $tag);
}
return $tag;
}
function filter2($contents)
{
$bad_words = explode(',', "tomato,lettuce,carrot,potato,broccoli,cucumber,pea" );
foreach ($bad_words as $naughty)
{
$contents = eregi_replace($naughty, "****", $contents);
}
return $contents;
}
$input = $contents;
$output = filter($input);
echo $output;
$input = $tag;
$output = filter($input);
echo $output;
$read = fopen("content.txt", "r");
$contents = fread($read, filesize('content.txt'));
fclose($read);
$write = fopen("content.txt", "w");
fwrite($write, "$tag $contents");
fclose($write);
}
print "<meta http-equiv=\"refresh\" content=\"0;index.php\">";
// Copyright 2006 - 2007 PixelResources
?>
Last edited by Fujitsu; 09-08-2006 at 02:37 PM.
PHP Code:[LEFT]<?[/LEFT]
[LEFT]$name = $_GET['name'];[/LEFT]
[LEFT]echo "Hi, your name is $name";[/LEFT]
[LEFT]?>[/LEFT]
[LEFT][/LEFT]
fujitsu how can you filter the variable tag and content shouldnt it be name and message?
.:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
.:.: Stand up for what is right, even if you stand alone:.:.
Want to hide these adverts? Register an account for free!