Jump to content

question about after a script is executed


MSUK1

Recommended Posts

send.php


//header redirect.
header('Location: http://mydomain.com/index.php?sent=1');

 

index.php

$message = NULL;
if(isset($_GET['sent'])) {
  $message = 'Sent Successfully!';
}


//decide on your message location, and echo the request.
echo $message;

 

 

*Warning - while you were typing a new reply has been posted. You may wish to review your post. *

And it is amazingly similar.

<?php
$message = NULL;
if(isset($_GET['send']) && $_GET['send'] == "Y"){
  $message = '- Thankyou, we will reply within 24 Hours';
}
else if(sset($_GET['send']) && $_GET['send'] == "N"){
  $message = '- Sorry, an error occured please try again';
}
?>

 

and then where i need the message displayed:

			<fieldset><legend>Online Form <?php echo $message; ?></legend>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.