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>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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.