Jump to content

Why don't this form submit?


Irresistable

Recommended Posts

I have this form, but it doesn't seem to submit when I click the button.

I do have if(isset($_POST['submit'])){ when I validate the form too.

Does anyone know why?

<table width="72%" border="0">
    <form action="" method="post" onSubmit="rememberinput('forename', 'surname', 'email')">      
      <tr height="37">
      <td width="16%">Full Name<?php echo $error['name'];?></td>
      <td width="44%"><input type="text" name="forename" id="name" value="forenames"
      onfocus="if(this.value=='forenames'){this.value='';}" 
      onblur="if(this.value==''){this.value='forenames';}" 
      onclick="document.getElementById('hint1').style.display = '';
      document.getElementById('hint2').style.display = 'none';
      document.getElementById('hint3').style.display = 'none';
      document.getElementById('hint4').style.display = 'none';
      document.getElementById('hint5').style.display = 'none';"/> 
      <input type="text" name="surname" id="surname" value="surname"
      onfocus="if(this.value=='surname'){this.value='';}" 
      onblur="if(this.value==''){this.value='surname';}"
      onclick="document.getElementById('hint1').style.display = '';
      document.getElementById('hint2').style.display = 'none';
      document.getElementById('hint3').style.display = 'none';
      document.getElementById('hint4').style.display = 'none';
      document.getElementById('hint5').style.display = 'none';"/></td>
      <td width="40%">
      <span id="hint1" style="display:none">Your Full Name.<span class="hint-pointer"> </span></span><br /></td>
      </tr>
      
      <tr height="37">
      <td>Your Email Address<?php echo $error['email'];?></td>
      <td><input name="email" type="text" id="email" value="<?php echo $_POST['email']; ?>"
      onclick="document.getElementById('hint1').style.display = 'none';
      document.getElementById('hint2').style.display = '';
      document.getElementById('hint3').style.display = 'none';
      document.getElementById('hint4').style.display = 'none';
      document.getElementById('hint5').style.display = 'none';" size="46"/></td>
      <td><span id="hint2" style="display:none">Your Email Address.<span class="hint-pointer"> </span></span><br /></td>
      </tr>
      
      <tr>
      <td>Message<?php echo $error['message'];?></td>
      <td><textarea name="message" cols="50" rows="9" class="textBox" id="message"
      onclick="document.getElementById('hint1').style.display = 'none';
      document.getElementById('hint2').style.display = 'none';
      document.getElementById('hint3').style.display = '';
      document.getElementById('hint4').style.display = 'none';
      document.getElementById('hint5').style.display = 'none';" value="<?php echo $_POST['message']; ?>"></textarea></td>
      <td><span id="hint3" style="display:none">Type the message you wish to display. Minimum 10 characters.<span class="hint-pointer"> </span></span><br /><br /><br /><br /><br /><br /><br /></td>
      </tr>
      <tr>
      <td><span style="width:149px;"><img src="pngimg.php" alt="" width="148" height="30" style="border:1px solid #448DC4;" name="captcha"/><br />
        <center><a href="#" onclick="Start();">Refresh</a> <strong>/</strong> <a href="#" onmouseover="document.getElementById('tip').style.display='';" 
      onmouseout="document.getElementById('tip').style.display='none';">Whats this?</a></center></span></td>
      <td><div style="width:149px;"><span id="tip" style="margin-left:10px; margin-top:3px; display:none">
        Captcha's are to prevent Bots from accessing our website. This field is to prevent spam
        </span>
      The answer is:
      <input name="captcha2" class="textBox" id="captcha" size="5" maxlength="2" 
      onclick="document.getElementById('hint1').style.display = 'none';
      document.getElementById('hint2').style.display = 'none';
      document.getElementById('hint3').style.display = 'none';"/>
      </div>
        <span style="width:149px;"><?php echo $error['captcha']; ?></span></td>
      <td><span id="tip1" style="margin-left:120px; margin-top:3px; display:none">
      Like the captcha field, this field is to prevent bots from accessing our website.
      </span></td>
      </tr>
      
      <tr height="37">
      <td> </td>
      <td><input name="submit" type="button" value="submit"/></td>
      <td> </td>
      </tr>
    </form>
    </table>

[/code]

Link to comment
https://forums.phpfreaks.com/topic/187042-why-dont-this-form-submit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.