Hi. I have a simple form
<form method="POST" onsubmit="return validateFormOnSubmit1(this)" action="sendEmail.php">
<p class="demo2">Receivers E-mail<a class="textFields">
<input type="text" name="receiver" size="30" maxlength="35" /></a></p>
<p class="demo2">Senders E-mail<a class="textFields2">
<input type="text" name="sender" size="30" maxlength="35" /></a></p>
<p class="button"> <input type="text" name="sender" size="40" maxlength="35" class="field"/>
<input name="Submit" type="submit" value="Send"/>
</p>
</form>
It checks that the input is ok, and if it is, it calls up sendEmail, to send an email. My send email looks like
<?php
session_start();
if(isset($_POST['Submit'])) {
$to = $_POST['receiver'];
$subject = "Has sent you an E-Card";
$sender = urlencode($_SESSION['sender']);
$body = "www.animatemycard.com/animatemycard/Anniversary/anniversarySendCard.php?sender=$sender";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "ERROR!";
}
?>
If this works ok, a new page displays saying data has been submitted to … Problem is, I dont want this to happen. On the html page where the initial form is, I have a text field. If the send email php works properly, I want the text field in my html to display Email sent. How would I go about doing this?
cheers