Form is not sending me the info i need

Ok, i have no idea what i am doing and i have searched the internet far and wide. I am trying to get emailed the form fields that are filled in with the php below. Here is what i get back in an email.

Name: Judith Richmond

              Company: Plymouth Educational Center\'s Foundation

                    WWW:

                    First Wesite:
But nothing for the WWW and First Site, the weird thing is my input value is not companyname it is company and that is working. Please help i have been at this since 8am est. the link to the form is http://www.jktconsultants.com/PECF_design.html.
<?php
  $email = $_REQUEST['email'] ;
  $fullname = $_REQUEST['fullname']; 
  $text = $_REQUEST['text'];
  $message = "Name: $fullname\n
              Company: $companyname\n
WWW: $text\n 
 First Wesite: $webLike1\n" ;
 
  mail( "richmo58@jktconsultants.com", "Feedback Form Results",
    $message, "From: $email"); 
  header( "Location: http://www.jktconsultants.com/thanks.html" );
?>

Open in new window

richmo587Asked:
Who is Participating?
 
Roger BaklundConnect With a Mentor Commented:
The three fields for disliked websites are all called "dweb4". You must have different names for each field, except for radiobuttons that are part of a group, they must have the same name.

Many of your fields have onclick="value=''". This will blank the field when the user clicks into it, which is very anoying when editing the input. Just remove the onclick from these fields.

The field "I would like our website to be designed to a fixed width." have wrong name for the radio buttons, they are called "activesite". This name is used higher up on the page.
0
 
Roger BaklundCommented:
The action attribute of the form points to a script "cgi-bin/mail.php", is that the script you posted in the snippet? Because of the mismatched field names I would guess you are editing the wrong script...
0
 
richmo587Author Commented:
Yes that is the script i am refeerring too. So if I understand you I changes the php script see below: Is that what you mean by "mismatched field names"? When I changed it I am now getting a 500 error
<?php
  $email = $_REQUEST['email'] ;
  $name = $_REQUEST['name']; 
  $message = "Name: $name\n
              Company Name: $company\n
			  First Site: $weblike\n" ;
 
  mail( "richmo58@jktconsultants.com", "Feedback Form Results",
    $message, "From: $email"); 
  header( "Location: http://jktconsultants.com/cgi-bin/thanks.html" );
?>
 

Open in new window

0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
richmo587Author Commented:
Do these files have to be in a cgi-bin folder?
0
 
Roger BaklundCommented:
No, php files does not normally have to be in a cgi-bin folder.

The mismatched field names was $company/$companyname and $name/$fullname. In the form, the fields are named 'company' and 'name', in the snippet you posted you read field with names 'companyname' and 'fullname', and it worked. It should not have worked. That is why I was guessing it was the wrong script.

I can't see anything that would result in a 500 Internal server error. Using the wrong field name will not give such an error, it will just give blank values.

Do you have access to the web server error logs?

Try this, it will show which variables are available:
<?php
 
  var_dump($_REQUEST);
 
  $email = $_REQUEST['email'] ;
  $name = $_REQUEST['name']; 
  $message = "Name: $name\n
              Company Name: $company\n
                          First Site: $weblike\n" ;
 
  mail( "richmo58@jktconsultants.com", "Feedback Form Results",
    $message, "From: $email"); 
  #header( "Location: http://jktconsultants.com/cgi-bin/thanks.html" );
?>

Open in new window

0
 
richmo587Author Commented:
Yeah that really didnt work, i changed it back because there is a thanks.html in the root folder. However there is also one in the cgi-bin folder but when i code in that path it doesnt like it? I
0
 
richmo587Author Commented:
That brought up the results in a browser and sent me an email. The weblike part is not filled in the email below:

Name: JK Thornburg And Associates

              Company Name: Plymouth Educational Center\'s Foundation

                          First Site:

array(41) { ["name"]=> string(27) "JK Thornburg And Associates" ["company"]=> string(41) "Plymouth Educational Center\'s Foundation" ["email"]=> string(22) "richmo58@studiojkt.com" ["webLike"]=> string(23) "www.thatwasfuckedup.com" ["likeweb4"]=> string(0) "" ["webLike2"]=> string(4) "www." ["webLike3"]=> string(4) "www." ["dweb4"]=> string(4) "www." ["dlikeweb4"]=> string(0) "" ["fonts2"]=> string(0) "" ["fonts3"]=> string(0) "" ["otherexpand2"]=> string(0) "" ["graphics3"]=> string(0) "" ["graphics"]=> string(0) "" ["email2"]=> string(0) "" ["copyrinfo"]=> string(0) "" ["graphics4"]=> string(0) "" ["graphics5"]=> string(0) "" ["aother1t"]=> string(0) "" ["aother2t"]=> string(0) "" ["aother3t"]=> string(0) "" ["aother4t"]=> string(0) "" ["startpages"]=> string(0) "" ["graphics7"]=> string(0) "" ["info"]=> string(0) "" ["sell"]=> string(0) "" ["product"]=> string(0) "" ["impress"]=> string(0) "" ["prospects"]=> string(0) "" ["contact"]=> string(0) "" ["brand"]=> string(0) "" ["otherdetails"]=> string(0) "" ["otherdetails2"]=> string(0) "" ["otherexpand"]=> string(0) "" ["otherservicestext"]=> string(0) "" ["keyword"]=> string(0) "" ["otherkeyword"]=> string(0) "" ["graphics6"]=> string(0) "" ["sixweeks"]=> string(104) "A Website completion date of 6 weeks from the date I provide all needed graphics and copy is acceptable." ["compdate"]=> string(22) "Time required in weeks" ["Submit"]=> string(6) "Submit" } 

Open in new window

0
 
richmo587Author Commented:
Those mismatched fills came from someone else that was helping me earlier today with this. I dont know why it was working but it was and when i put the corret values in it would not return the form input -
0
 
Roger BaklundCommented:
The name of the "First site" variable is 'webLike', not 'weblike' (capital L). Variable names are case sensitive.

You can remove the line with var_dump(), that was only to see which variables you are sending.

For better formatting of the message in the email, use one of these methods:
$message = "Name: $name\n".
           "Company Name: $company\n".
           "First Site: $webLike\n";
 
# Alternatively:
$message = "Name: $name
Company Name: $company
First Site: $webLike";

Open in new window

0
 
richmo587Author Commented:
Just got up cxr: let me take a look at this and i will respond - Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.