catcahfirefly Posted March 10, 2007 Share Posted March 10, 2007 I am not familiar with PHP, but I tried running through the tutorial on how to the PHP Mailer form to work, http://www.phpfreaks.com/tutorials/130/3.php. I uploaded the files to my server, but I don't know what to do next. I had a CGI script working until my hosting company upgraded their perl and the script is no longer compatible with the latest version. All I wanted to do is create a simple feedback form on my site and have the results sent to my e-mail box. I don't get how the PHP communicates with the form. Any suggestions and help would greatly be appreciated. ??? Thanks! Link to comment https://forums.phpfreaks.com/topic/42090-newbie-to-php-need-help/ Share on other sites More sharing options...
skali Posted March 15, 2007 Share Posted March 15, 2007 1- submit your form as usual to any .php file e.g. process_form.php 2- here you can get all your form variables in PHP built-in array $_POST 3- You can access it as <?php $_POST['form_field_name1']; $_POST['form_field_name2']; $_POST['form_field_name3']; ?> 4- concat all your form field the way you want. <?php $email_message = ''; $email_message .= $_POST['form_field_name1']; $email_message .= $_POST['form_field_name2']; $email_message .= $_POST['form_field_name3']; ?> 5- now you have your message ready to be sent to any email address using following php function bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]] ) [url]http://php.net/mail[/url] Link to comment https://forums.phpfreaks.com/topic/42090-newbie-to-php-need-help/#findComment-207846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.