hi frnds...

i m using front end page is in HTML(contactus.html)... back end is in PHP page(contact_action.php)....

here i m trying to send mail to admin from user...After successfull completion of mail sending , the user gets a Message.,..(like..messgae successfully send..)..

below is my code...can any body change plz...

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
header("location:contactus.html?msg=Message Successfully sent"); }?>

Dont forget i m using .html extention..

Thanks in advance...

So what's happening currently – is the PHP form not redirecting to the 'contactus.html' page?

What result are you currently seeing?

So what's happening currently – is the PHP form not redirecting to the 'contactus.html' page?

What result are you currently seeing?

Hi..

i m getting the message in Url...but i want to display as alert or any other place...

hi,

<body onload="javascript: var hu = window.location.search.substring(1);
ft = hu.split('='); var g=ft[1]; if(g!=''){alert(g);}">
</body>

use above code in contactus.html . put onload event contactus.html page it will display alert message in contact.html. this is useful for u . i am new to php.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.