P2P | IT Discussions Forum

Full Version: help with script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am php beginner and just write this simple program, Can someone please solve my code problem? Whats wrong with it?

PHP Code:
<?php

$name = $_GET['name'];
$name = str_replace("admin","", $name);
$lastn = $_GET['lastn'];
$full = $name . " " . $lastn;

echo $full . " how are you today?";

if ($name == "hacker" OR $lastn == "hacker") {
echo "You are hacker! Smile";
} else {
header("Location: new.php");
}
?>
It would help if u told us the error ur getting :x
This line of code
Quote:echo $full . " how are you today?";
is outputing data, and you can't send header information
Quote:header("Location: new.php");
if something else is sent before.
Reference URL's