Jump to content

Contact form not returning content. Please help.


Recommended Posts

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 post
Share on other sites

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...)

Edited by viper_
Link to post
Share on other sites
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 post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...