Jump to content

[SOLVED] how to use submit buttons?


Eggzorcist

Recommended Posts

still not responding...

 

<?php
require_once("functions.php");

if (isset($_POST['post_form'])){
register_user($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['email'], $_POST['securityCode']);
}
?>


<p>Username: 
  <label>
  <input name="username" type="text" id="username" maxlength="15" />
  </label>
</p>
<p>
  Password: 
  <label>
  <input type="password" name="password1" id="password1" />
    </label>
  </p>
<p>
  Re-type Password: 
  <label>
  <input type="password" name="password2" id="password2" />
    </label>
  </p>
<p>
  E-mail: 
  <label>
  <input type="text" name="email" id="email" />
    </label>
</p>
<p>  <img src="captcha/captcha.php" alt="captcha" /><br />
  Security Code: 
  <label>
  <input name="securityCode" type="text" id="securityCode" maxlength="5" />
  </label>
</p>
<p>
  <label>
  <input type="submit" name="post_form" id="post_form" value="Submit" />
  </label>
</p>

You haven't set up a form around it.  :D

 

<form id="reg" action="" method="post">
<p>Username: 
  <label>
  <input name="username" type="text" id="username" maxlength="15" />
  </label>
</p>
<p>
  Password: 
  <label>
  <input type="password" name="password1" id="password1" />
    </label>
  </p>
<p>
  Re-type Password: 
  <label>
  <input type="password" name="password2" id="password2" />
    </label>
  </p>
<p>
  E-mail: 
  <label>
  <input type="text" name="email" id="email" />
    </label>
</p>
<p>  <img src="captcha/captcha.php" alt="captcha" /><br />
  Security Code: 
  <label>
  <input name="securityCode" type="text" id="securityCode" maxlength="5" />
  </label>
</p>
<p>
  <label>
  <input type="submit" name="post_form" id="post_form" value="Submit" />
  </label>
</p></form>

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.