Jump to content

Recommended Posts

WARNING: I'm a relative newbie!

 

I'm trying to fetch and then POST calculations from this page http://www.christchurchphotographer.co.nz/wedding-quote-calculation.php to an email address when the user clicks the "submit for verification button."

 

Can anyone help me on this one?

 

Thanks

 

Scoopy

Link to comment
https://forums.phpfreaks.com/topic/119016-solved-fetch-and-post/
Share on other sites

Hi there, thanks for the reply.

 

Sure, I understand.  What I after is someone to point me in the right direction - a relevant tutorial maybe or an example, a script that someone knows of. 

 

I tried placing the estimate generated on his page http://www.christchurchphotographer.co.nz/wedding-quote-calculation.php inside a form and just posting it using FormMail by Tectite.  But I've realised that Formail only POSTs "input"  elements (excuse me if I'm using all the wrong terminology).

 

Any help much appreciated.

 

Scoopy

Hello Scoopy,

You have your page set up and are trying to retrieve the values from the form is what im understanding here...? So you have all of the form sections labels on the website and want them to be emailed to you and probably the person who submits the form.  Well by looking at your pages source code, i am not sure whats going on with the submit button.  You only should need the type and name, the forms "action" will handle the rest.  on the wedding-quote-calculation.php youre going to need some code.  I am assuming this is your website, and are able to add code to your php file. 

 

to get the data on the php page you use:

 

$EmailAddress=$_POST['EmailAddress'];

where 'EmailAddress' is the input fields name

you need to do this for each field on the form

 

to mail this to somebody

mail($to, $subject, $message, $from);

where each $variable needs to be defined prior aka

$to=$_POST['EmailAddress'];

to make all of the fields send within the $message variable use

$message = "Thank you ".$Name." Your estimate for this is going to be: ".$Estimate;

use this method for the rest of  you can add whatever text you want within the quotations and concatinate the variables using the periods.

Hope this helps, post back if you have questions ill keep an eye out.

~SaleBoat

Thanks for you help TheSailBoat.  Think I have it sorted.

 

I was trying to use Tectile FormMail to POST the values on the http://christchurchphotographer.co.nz/wedding-quote-calculation.php page to my email address.  I achieved this in the end just by duplicating the PHP values as hidden input values.  In this way FormMail was able to pick up the values and POST them. 

 

Works great!  :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.