Jump to content

Recommended Posts

I don't know where's the problem with this form, but I can't manage to send the vars to the PHP.

They are always empty.

Everything looks normal for me.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
                       <form method="POST" action="sendmail.php" id="commentForm" enctype="text/plain" >
                            
            <table width="100%" border="0" cellspacing="5" cellpadding="5">
                  <td bgcolor="#FFE391"><label for="cname">Name</label></td>
                <td colspan="6" bgcolor="#FFE391">
                  <input name="cname" type="text" id="cname"/>
                </td>
                </tr>
                <tr>
                  <td bgcolor="#FFE391"><label for="ccity">City</label></td>
                  <td colspan="6" bgcolor="#FFE391"><input id="ccity" name="ccity"/>
            </td>
                </tr>
                <tr>
                  <td bgcolor="#FFE391"><label for="czip">Zip</label></td>
                  <td colspan="6" bgcolor="#FFE391"><input id="czip" name="czip"/>
            </td>
                </tr>
                <tr>
                  <td bgcolor="#FFE391"><label for="cemail">E-mail</label></td>
                  <td colspan="6" bgcolor="#FFE391"><input id="cemail" name="cemail"/></td>
                </tr>
              <tr>
                <td colspan="7" bgcolor="#FF9224" class="table_titles">
                  <input class="submit" type="submit" value="Send"/>
                </td>
                </tr> 
                </table>                
                </form>
</body>
</html>


<?Php
echo "
Name: ".$_POST['cname']."<br />
City: ".$_POST['ccity']."<br />
Zip: ".$_POST['czip']."<br />
E-mail: ".$_POST['cemail']."<br />";
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.