php - trying to do registration to display in mysql -


hi im noob @ this, im doing simple project, does'nt need secure or anything

im trying registration page , display information to php page looked @ many guides , still find confusing

these codes

this displaying table in php, working

<?php  mysql_connect('localhost','root','');  mysql_select_db('login');  $sql="select * registranttb";  $records=mysql_query($sql);  ?>  <table width="600" border="1" cellpadding="1" cellspacing="1">      <tr>    <th>name</th>  <th>course applied for</th>  <th>email</th>  <th>contact number</th>  <th>registration date</th>  <tr>  <h1>course</h1>       <?php       while($registranttb=mysql_fetch_assoc($records)) {  echo "<tr>";   echo "<td>".$registranttb['name']."</td>";  echo "<td>".$registranttb['course']."</td>";  echo "<td>".$registranttb['email']."</td>";  echo "<td>".$registranttb['contact']."</td>";  echo "<td>".$registranttb['date']."</td>";     }    ?> 

i have no clue here on out....btw when edit files in mysql can display information of that

your html in not correct. cannot output <h1> between <tr> tags, , not closing <tr> tags or <table> tag.

<h1>course</h1>  <table width="600" border="1" cellpadding="1" cellspacing="1">   <tr>     <th>name</th>     <th>course applied for</th>     <th>email</th>     <th>contact number</th>     <th>registration date</th>   <tr>  <?php while($registranttb=mysql_fetch_assoc($records)) { ?>    <tr>     <td><?php echo $registranttb['name'] ?></td>     <td><?php echo $registranttb['course'] ?></td>     <td><?php echo $registranttb['email'] ?></td>     <td><?php echo $registranttb['contact'] ?></td>     <td><?php echo $registranttb['date'] ?></td>   </tr>  <?php } ?>  </table> 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -