PHP4+GuestBook

Well im not so xperience on this but can some one fix this php script so that it will work for php4xxx.I believe it has to do something with RegisterGlobals.
Thnx and if could fix it can you teach me how you know what goes where.I know you have to use ($_GET, $_POST, $_REQUEST) but i dont know where to put them and i have tried but just doesnt work for me.
thnx


<?

//No need to edit anything below here.
if (!isset($name) || !isset($email) || !isset($message) || empty($name) || empty($email) || empty($message)) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Input required for all fields.");
exit;
}

$email = strtolower($email);

addentry($name, $email, $website, $message);

function addentry($name, $email, $website, $message) {

$posted = strftime("%D %I:%M %p");

$message = stripslashes($message);

$file = fopen('entry.txt', 'a+');

if (!$file) {
print "&result=Fail";
print "&errorMsg=" . urlencode("Could not open entry.txt file. Change CHMOD levels to 766.");
exit;
}
 
fputs($file, "<font color=\"#11396D\">Name:</font> $name
<font color=\"#11396D\">Email:</font><font color=\"#666666\"><A href=\"mailto:$email\"> $email</A></font><br>
<font color=\"#11396D\">Website:</font><font color=\"#666666\"><A href=\"http://$website\"target=\"_blank\"> $website</A></font><br>
<font color=\"#11396D\">Posted:</font> $posted
<font color=\"#11396D\">Message:</font> $message

");
fclose($file);

// Send admin an email when new entry occurs
mailAdmin($name, $email, $website, $message);
}

function mailAdmin($name, $email, $website, $message) {
	$mailTo = "you@yoursite.com";
	$mailFrom = "From: <you@yoursite.com>";
	$mailSubject = "New Guestbook Entry";
	$mailBody = "A visitor to your site has left the following information in your guestbook:

	Name: $name
	Email: $email
	Website: $website
	The visitor commented:
	------------------------------
	$message 
	------------------------------
	You can view the message at:
	http://www.yoursite.com";
	mail($mailTo, $mailSubject, $mailBody, $mailFrom);
	mail($email, "Your Subject", "Thank you message", "From: [email]you@youremail.com[/email]");
}

print "&result=okay";
exit;

?>