We help IT Professionals succeed at work.

Capture form values

Needy11
Needy11 asked
on
266 Views
Last Modified: 2012-06-05
We have an online register and pay form that unfortunately has alot of steps. I am working to make it simpler but in the first instance I want to make sure to capture and email details on the first step to an internal email address so if they drop out before finishing all steps we can at least make contact with them.

here is the page we are using....

https://www.icepe.ie/index.php?option=com_enrolcourses&view=enrolcourses&courseid=22&Itemid=18&countrytabs=0

and in code I have placed the following...

<?php
            $from             = "icep.europe@gmail.com";
            $sender            = "ICEP support";
            $subject    = 'Enrol starter details';
            $message = ?????;
            JUtility::sendMail($from, $sender, "support@icepe.eu", $subject, $message,1);
?>


but I do not know how to refer to elements captured on the first step of the form e.g.email is referred as

    <td class="labl">Email:<font color='red'>*</font></td>
    <td><input type="text" name='email' value=''  id='email' /></td>

but $email if assigned to $message does  not output the value of the email selection\input in the email that gets issued.

Many thanks for any assistance.
Comment
Watch Question

Most Valuable Expert 2011
Author of the Year 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thank you, does the post and\or get happen only at the end of the form or on each step through it. I haven't been able to locate where it occurs on each step.

Also if I want to assigne teh contens fo the variables to $message for teh email what would the format be

$message = $get(email);   // perhaps

Thanks
Most Valuable Expert 2011
Author of the Year 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks for that. From a local conversation here I have been told that it might also be possible to use AJAX to capture values that the browser holds rather than having to wait or read var dumps which for me might be long and wieldy. Unfortunately I am the extent of the PHP resource available here.

let me know if you think that would work and how I would go about it.

Thanks
Most Valuable Expert 2011
Author of the Year 2014

Commented:
I would not try to capture the values with AJAX.  That process will introduce another (unnecessary) level of complication.  I think you're better off using the PHP functions.  

If you want, make a test and post the output of var_dump() here in the code snippet.  I can probably help you read it and follow the information from the HTML form into the PHP scripts.
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I managed to get a friend to do the ajax route for me. It worked well and quick as there was already ajax involved. Thanks for the insights into how to approach this
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.