View Full Version : New to php form results

02-14-2014, 06:40 PM
I design in DW in split view and have been limited to html. I have a request for a contact form that does not expose the client's email address and so I am now learning basic PHP.
I have found two of your tutorials helpful but am not quite there. I started with "Using Dreamweaver and PHP to send form results in an email" and also "PHP includes" Right now I have the form built and the the include script in place but it the form sends to a page full of the php code. I will attach that section of code. Take it ease on me--I am new at this :)
I also wondered if I created the php file correctly but in the code view the copied script is the only script there.
Here is the form script. I can also provide a link to the test site page if preferred.

<form id="Contact Form" name="Contact Form" method="post" action="sendresults.php">
<?php include("includes/menu.php"); ?>

<label for="Name">Name</label>
<input type="text" name="Name2" id="Name" />
<label for="Phone ">Phone (optional)</label>
<input type="text" name="Phone " id="Phone " />
<label for="Email2">Email</label>
<input type="text" name="Email2" id="Email2" />
<label for="Comment2">Comment</label>
<textarea name="Comment2" id="Comment2" cols="45" rows="5"></textarea>
<input type="submit" name="Submit" id="Submit" value="Submit" />
<br />
<p>&nbsp; </p>

02-15-2014, 01:11 AM
well as a form its ok but the file in your action action="sendresults.php
will be the script that handles it. if you copied it from thiis forum it should be ok, although there was a redirect issue mentioned lately

02-15-2014, 07:35 AM
I did copy it from the website but the directions were to set the action to www.yourwebsite.com/sendresults.php. When I used that I got a "no file exists" error. Where I took out the web address and linked to the file using the browse option I at least went to the page of code instead of an error. I also added " <?php include ("includes/menu.php")" based on your Using PHP site

02-15-2014, 09:34 PM
Here is a link to what is going on


02-17-2014, 01:12 AM
the action reads

so use
or the full site URL

03-04-2014, 08:30 PM
OK, gt this to work on another site. The problem may have been the test site. Thanks for your help!

04-03-2014, 12:11 AM
email server is probably not configured on the test server. you would also have to configure php.ini