logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-14-2011, 07:53 PM   #1
Tomcat104
 
Join Date: Aug 2009
Location: Charlotte, NC USA
Posts: 96
Default HELP!!! Form not working right

I have just created my first form in Dreamweaver CS5 and I can't get it to work. I have sought the advice of MAYBE too many online tutorials so I'm turning to you guys for help. Following is the code I used and if someone can point out where I went wrong I'll change it again. The form seems to be set but when I press the "Submit" button I get a message that pops up telling me to download the PHP file that I have just downloaded.

Code:
<form id="ContactForm" name="ContactForm" method="post" action="FormToEmail.php">
        <table width="551" border="0" align="left" cellpadding="4" id="contact">
          <tr>
            <td width="198" bgcolor="#FFFFFF">Full Name:</td>
            <td width="284" bgcolor="#FFFFFF"><input name="fullname" type="text" id="fullname2" size="45" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Email Address:</td>
            <td bgcolor="#FFFFFF"><input name="email" type="text" id="email" size="45" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Home Phone:</td>
            <td bgcolor="#FFFFFF"><input name="homephone" type="text" id="homephone" size="21" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Cell Phone:</td>
            <td bgcolor="#FFFFFF"><input type="text" name="cellphone" id="cellphone" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF"><strong>PROPERTY INFORMATION</strong></td>
            <td bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Address:</td>
            <td bgcolor="#FFFFFF"><input name="address" type="text" id="address" size="40" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">City:</td>
            <td bgcolor="#FFFFFF"><input type="text" name="city" id="city" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">State:</td>
            <td bgcolor="#FFFFFF"><img src="../images/2x2.gif" width="2" height="2" />
              <select name="state" id="state">
              <option value="NC" selected="selected">NC</option>
              <option value="SC">SC</option>
            </select></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td>Zip Code:</td>
            <td><input type="text" name="zip" id="zip" /></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF">Approximate Sq. Feet</td>
            <td bgcolor="#FFFFFF"><input type="text" name="sqfeet" id="sqfeet" /></td>
          </tr>
        </table>
        <p>
          <label for="fullname"></label> 
          <label for="fullname2"></label>
        </p>
        <p>Comments:
          <label for="comments"></label>
          <textarea name="comments" id="comments" cols="55" rows="5"></textarea>
        </p>
        <p>
          <input type="submit" name="submit" id="submit" value="Submit" />
          <input type="reset" name="reset" id="reset" value="Reset" />
          <br />
        </p>
      </form>

Last edited by Corrosive; 07-15-2011 at 09:04 AM..
Tomcat104 is offline   Reply With Quote
Old 07-14-2011, 09:02 PM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

most of the time this is a sign that you don't have PHP on your web server. Check this with your host.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 07-14-2011, 09:43 PM   #3
Tomcat104
 
Join Date: Aug 2009
Location: Charlotte, NC USA
Posts: 96
Default

I uploaded the FormToEmail.PHP file to my server. Should I have uploaded something else or ask my host to upload something? As I said I'm new again to Dreamweaver and have never done a form before.
Tomcat104 is offline   Reply With Quote
Old 07-14-2011, 09:47 PM   #4
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

In order to work with PHP files there must be PHP installed on your server. You can check it with your host or check it yourself with a phpinfo.php file.
See this topic for that:
http://docs.simplemachines.org/index.php?topic=479.0
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 07-15-2011, 09:04 AM   #5
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Also make sure your pages have the .php file extension or use .htaccess to handle .html as .php http://www.desilva.biz/php/phpinhtml.html
Corrosive is offline   Reply With Quote
Old 07-15-2011, 09:05 AM   #6
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Moved to PHP board.
Corrosive is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:15 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com