Reply to topic
my registration did not work out
eafatihah


Joined: 07 May 2009
Posts: 1
Reply with quote
hello..
i need someone help please.
my registration form do no make sense because all the data did not save to the database(mysql).

how come huh? Sad

i have make connection to the database.
these are the coding.
Code:

<?php #script the registre.php
//set the page title and include  the HTML header
include 'mysql_connect.php';
$page_title = 'Register';
include ('./header.inc');

// display the form?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<fieldset>
  <div align="left">
    <legend>Enter your information in form below:
      <br />
</legend>
    <form name="form1" method="post" action="functions-iic.php">
      <table width="545" cellpadding="5">
      <tr>
        <td>Personal Details </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td width="144"><div align="right">First name:</div></td>
        <td width="373"><input name="firstname" type="text" id="firstname">        </td>
      </tr>
      <tr>
        <td><div align="right">Last name: </div></td>
        <td><input name="lastname" type="text" id="lastname">        </td>
      </tr>
      <tr>
        <td><div align="right">Gender:</div></td>
        <td><div align="left">
            <select name="gender" id="gender">
           <option>   </option>
              <option>male</option>
              <option>female</option>
            </select>
        </div></td>
      </tr>
      <tr>
        <td height="34"><div align="right">Date of birth: </div></td>
        <td><select name="day" id="day">
         <option>   </option>
            <option>1</option>
            <option>2</option>
            <option>3</option>
            <option>4</option>
            <option>5</option>
            <option>6</option>
            <option>7</option>
            <option>8</option>
            <option>9</option>
            <option>10</option>
            <option>11</option>
            <option>12</option>
            <option>13</option>
            <option>14</option>
            <option>15</option>
            <option>16</option>
            <option>17</option>
            <option>18</option>
            <option>19</option>
            <option>20</option>
            <option>21</option>
            <option>22</option>
            <option>23</option>
            <option>24</option>
            <option>25</option>
            <option>26</option>
            <option>27</option>
            <option>28</option>
            <option>29</option>
            <option>30</option>
            <option>31</option>
          </select>
        day
        <select name="month" id="month">
        <option>   </option>
          <option>January</option>
          <option>February</option>
          <option>Mac</option>
          <option>April</option>
          <option>May</option>
          <option>Jun</option>
          <option>July</option>
          <option>August</option>
          <option>September</option>
          <option>November</option>
          <option>December</option>
        </select>
        month
        <input name="year" type="text" id="year" size="5">
        year(yyyy)</td>
      </tr>
      <tr>
        <td height="34"><div align="right">Email Address: </div></td>
        <td><input name="email" type="text" id="email"></td>
      </tr>
      <tr>
        <td height="34">Login Details </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="34"><div align="right">Username:</div></td>
        <td><input name="username" type="text" id="username"></td>
      </tr>
      <tr>
        <td height="34"><div align="right">Password:</div></td>
        <td><input name="password" type="password" id="password"></td>
      </tr>
      <tr>
        <td height="34"><div align="right">Retype password: </div></td>
        <td><input name="repassword" type="password" id="repassword"></td>
      </tr>
      <tr>
        <td height="34">&nbsp;</td>
        <td><input type="submit" name="submit" value="Submit Information" />
        <input type="reset" name="Reset" value="Reset"></td>
      </tr>
      <tr>
        <td height="34">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table>
</form></p>
<div align="center"></div>
</form>


<?php

include ('./footer.inc');
?>
nathacof
Forum Admin

Joined: 24 Oct 2006
Posts: 192
Location: Dover, DE
Reply with quote
I'm not seeing any code to handle the submitted form data. You'll need something like this:

Code:
<?php if(isset($_POST['submit'])) {
    // Do input validation or display errors
    // If data is valid run the INSERT
}
my registration did not work out
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic