- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › PHP + jQuery
Hey
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
$speech = "Message has been sent!
"; ?>
}
}
?>
Right, So heres my problem.
I have a massive php script in the same file as the form.
I want to make the jQuery go in the $Speech=”” slot. So that when I click the form, Instead of saying “Message has been sent”, I want it to do a jQuery script.
And incase you need the whole php script… here it is.
$speech = "";
if(isset($_POST)) {
if ( $_POST == "" || $_POST == "" || $_POST =="" || $_POST =="" ) {
$speech = "You have left something blank.
";
} else {
$EmailFrom = "[email protected]";
$EmailTo = "[email protected]";
$Subject = "Coadin-Internet Contact Form.";
$Name = Trim(stripslashes($_POST));
$Email = Trim(stripslashes($_POST));
$Phone = Trim(stripslashes($_POST));
$Message = Trim(stripslashes($_POST));
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "n";
$Body .= "Phone: ";
$Body .= $Phone;
$Body .= "n";
$Body .= "Message: ";
$Body .= $Message;
$Body .= "n";
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
$speech = "Message has been sent!
"; ?>
}
}
?>
And heres the Output which is not part of the PHP Script
Anyone?
Ugh