Hi there, This is part of a form to mail code. How can I put a link back to educat.html page after form info is captured and the "Your message has been successfully entered" has been generated in php page. The link will take the user to the homepage $success_sent_msg='<p align="center"><strong> </strong></p> <p align="center"><strong>Your message has been successfully sent to us<br> </strong> and we will reply as soon as possible.</p> <p align="center">A copy of your query has been sent to you.</p> <p align="center">Thank you for contacting us.</p> <p align="center"><a href="http://www.educat.co.za/index.html>Click here to go back</a></p>'; Thanks
$success_sent_msg='<p align="center"><strong> </strong></p> <p align="center"><strong>Your message has been successfully sent to us<br> </strong> and we will reply as soon as possible.</p> <p align="center">A copy of your query has been sent to you.</p> <p align="center">Thank you for contacting us.</p> <p align="center"><a href="http://www.educat.co.za/index.html>Click here to go back</a></p> <p align="center"><a href="http://www.educat.co.za/educat.html>Click here to go to the homepage</a></p>';
no, not like that. How can I implement the echo or print command for link back to previous page Thanks
I still don't get it, lol. Could you be a little more specific? print('<a href="http://www.educat.co.za/educat.html">Click to go back to homepage?</a>'); PHP:
The problem is the link is not visible after form data is posted. You only see the following on the webpage: I want the link back to the previous to appear below message, but it must be visible. Maybe there is something wrong with my code
$success_sent_msg='<p align="center"><strong> </strong></p> <p align="center"><strong>Your message has been successfully sent to us<br> </strong> and we will reply as soon as possible.</p> <p align="center">A copy of your query has been sent to you.</p> <p align="center">Thank you for contacting us.</p> <p align="center"><a href="http://www.educat.co.za/contactus.html">Click here to go back</a></p>'; PHP: Try changing that line - you're missing a " off the end of the URL itself.
I have a script that does this... I forget where I found it; but the lady who wrote it has her name In the notes; I kept them of course... right thing to do. Copyright ©2005, email script by Christine M. R. It's a php script made to Send email forms/captures - you plug in all your values, email, etc... and in it she defines 2 Variables. $thankyou .= 'your stuff here'; //page to continue to $continue = "pageyouwant.php"; // And then, we're done! PHP: Then, in the HTML ... displayed only when the form has been sent is... <a href="<?php print "$continue"; ?>"><h3>Click here to continue</h3></a> HTML: this of course, displays a header "click here to continue" that links to the value you put in the $continue variable. So quick run down. 1. you have your page with the form on it - the form is set to execute ThisScript.php 2. ThisScript.php has all of the email code in it; and defines a few variables at the end - (defined above the header) 3. in the Body of ThisScript.php is your normal html code, body tags, etc... along with whatever you want displayed on that page - Including a link TO the page you want people going to. Hope i didn't confuse ... hope this helps.
You don't really need that script (unless you don't even have any PHP code to send the email yet). You only need to fix your output HTML like the couple above posts mentioned, which I'll put here: $success_sent_msg='<p align="center"><strong> </strong></p> <p align="center"><strong>Your message has been successfully sent to us<br> </strong> and we will reply as soon as possible.</p> <p align="center">A copy of your query has been sent to you.</p> <p align="center">Thank you for contacting us.</p> <p align="center"><a href="http://www.educat.co.za/index.html">Click here to go back</a></p> <p align="center"><a href="http://www.educat.co.za/educat.html">Click here to go to the homepage</a></p>'; PHP: You were just missing the closing quotation " at the end of your <a> tag, which made it all get hidden.