gbetza Posted January 23, 2012 Share Posted January 23, 2012 I've been working with php for a short time and picked this form up online to use for my contact page. When tested on my server, http://www.d1082919....h/contact2.html the text fields return all of the correct content (email, name, phone, etc.) to me in an email. When I put the site live, http://vitalhabitats.com/contact2.html the text fields all return blank. I still receive the email, but it looks like this: Email:Name:Phone Number:Comments:Newsletter: I cannot understand what the potential issue may be. I know the form works, just not on this server. My php file is attached for review. Any help is greatly appreciated. contactformprocess.php Link to comment Share on other sites More sharing options...
viper_ Posted January 23, 2012 Share Posted January 23, 2012 you could try $_REQUEST array: $emailField = $_REQUEST['email'];$nameField = $_REQUEST['name'];$phoneField = $_REQUEST['phone'];$commentsField = $_REQUEST['comments'];$newsletterField = $_REQUEST['newsletter']; or dumping $_POST/$_REQUEST array: print_r($_POST);print_r($_REQUEST); to see if there's some data.. (maybe a php conf problem...) Link to comment Share on other sites More sharing options...
gbetza Posted January 23, 2012 Author Share Posted January 23, 2012 you could try $_REQUEST array:$emailField = $_REQUEST['email'];$nameField = $_REQUEST['name'];$phoneField = $_REQUEST['phone'];$commentsField = $_REQUEST['comments'];$newsletterField = $_REQUEST['newsletter']; or dumping $_POST/$_REQUEST array: print_r($_POST);print_r($_REQUEST); to see if there's some data.. (maybe a php conf problem...) Thanks viper_. I tried the $_REQUEST array and it works but it doesn't solve the issue. My fields are still returning blank. As for dumping the $_POST/$_REQUEST array, I'm not sure what you mean. I'm really pretty new to this so if you could elaborate that would help. I look forward to your reply. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 23, 2012 Share Posted January 23, 2012 You can use one of the print_r statements that viper showed to print out the entire array so that you can see everything that was submitted from the form. Link to comment Share on other sites More sharing options...
gbetza Posted January 23, 2012 Author Share Posted January 23, 2012 Thank you. The issue I discovered was that variables within the body text were undefined. I needed to add "Field" Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.