Helpful Information
 
 
Category: Programming Languages
url redirection...

please I need help about a simple question...

I have modified a recommend script.
I need the way to redirect user in the same page and include in that both thank's message and error message.

my code is:
<script "language = php3">

$nameX = stripslashes($name);
$to_nameX = stripslashes($to_name);
$url = "http://www.3plane.it";
$to_messageX = ($to_message);
$message = "$nameX ha visitato il nostro web: $url
e ti invia il seguente messaggio:
$to_message";

$subject = "$nameX: un interessante web site";

if (( $to_email_address) && ( $from_email_address)) {

mail($to_email_address, $subject, $message,
"From: $from_email_address
Reply-To: $from_email_address
X-Mailer: PHP
Errors-To: $from_email_address");
echo "Grazie $nameX, Il tuo messaggio è stato accodato con successo.";
} else {

echo "error, torna alla pagina precedente";
}

</script>

thank you very much and i hope to return.

bye,

Domenico

Hi Domenico,

You mean something like:

...
$returnMessage = "Grazie $nameX, Il tuo messaggio è stato accodato con successo.";
}
else {
$returnMessage = "error, torna alla pagina precedente";
}

</script>
....
<BODY>
<? print $returnMessage; ?>
</BODY>
</HTML>

Regards, Peter

[This message has been edited by PAV (edited February 07, 2000).]










privacy (GDPR)