Hi All
I am writing some 'contact me' code for my web page and need some help with
the following code snipet below:
$validated ="Yes"; //declared early in the code, and I got some other error
//checking
if (strlen($message) > 128){
$validated = "No";
}
//some other stuff I won't bore you with
if ($validated == "Yes"){
mail($to, $subject, $body);
echo "Thanks for you message!";
}
else {
// I need something like:
header("Location:
http://$site_url");
// BUT I don't want to type the full url, I want to go back
to the //previous page and I want it to work
when I use it on
// my other web site in a different directory so,
//www.myexampleblahblah.com/form.php
// is not ideal - How can I do it?
}
Many thanks, G