Hello all - Firstly, this query might be already repeated and coming up yet another time. I would appreciate if someone can direct me to the appropriate thread if this is already answered. If not, would be really helpful if someone can take out their precious time and knowledge to help me out.
I’m a naive programmer and learning PHP basically. For my website, I have the following requirement.
Someone coming to my landing page, entering their details and pressing submit, their details needs to be e-mailed and then they need to be shown a thank you page.
For this, I have the following code in the main page
[php]<form id="josform" name="josForm" action="http://www.xxx.com/thank.php" method="post" class="form-validate">
<tr>
<td><strong>Name</strong><br /><input name="name" id="form_name" type="text" class="form-field" /></td>
</tr>
<tr>
<td><strong>Email</strong><br /><input name="email" id="form_email" type="text" class="form-field" /></td>
</tr>
<tr>
<td><strong>Mobile</strong><br /><input name="phone" id="form_mobile" onKeyPress="return checkIt(event)" type="text" class="form-field" /></td>
</tr>
<tr>
<td>
<input type="hidden" name="source" value=""/>
<input type="submit" id="submit" name="submit" value="Submit" class="form-btn" onclick="return checkval_form()" /></td>
</tr>
</form>[/php]
Basically this code is getting inputs from user and in the action, the thank you page link is given.
The code snippet of thank you page code is as below
[php]
Thankyou page Thank you for your sharing your details. We will get back to you soon.This page will redirect in 5 seconds.. [/php]
The redirection is all working fine. Now what I need to do to have the e-mail sent to me with all input details? But the e-mail should NOT be dispayed in the webpage view source code. I think I need to put up a PHP script on my server and have it linked. This is where I have no clues and trying to get help.
Basically need to know how to link my main page to the file which shall send the actual email and then redirect to the thank you page.
Advance thanks for your time and help. I have been trying to find the answer on internet but unable to understand how the actual codes shall look.