2 Replies - 1898 Views - Last Post: 23 September 2012 - 09:42 AM

#1 pallavi11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 28-July 12

PHP + HTML FORM + HTML TABLE

Posted 21 September 2012 - 08:19 AM

want to register students for a quiz.there is a form on my web page. When user enter the required information in the form i want the data to be displayed in the table just below the form.I am using php and i dont know how to display multiple entries in table. my table show only one entry. its replace the old entry.you may refer this link also http://cwmag.cu.cc/registration.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<title>CWMag | Events | Registration</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
</head>
<body id="top">
<div class="wrapper row1">
  <div id="header" class="clear">
    <div class="fl_left">
      <h1><a href="index.html">CWMag</a></h1>
      <p>Computer Science Department</p>
      <p>DCRUST Murthal</p>
    </div>
     <div class="imgr"><a href="index.html"><img src="images/demo/logo.jpg" alt="logo" /></a></div>
  </div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper row2">
  <div id="topnav">
  <ul>
      <li class="active"><a href="index.html"><img src="images/home.gif"></a></li>
      <li><a href="cwmag.html">About US</a></li>
      <li><a href="helpdesk.html">Help Desk</a></li>
      <li><a href="alumni.html">Alumni</a></li>
      <li><a href="downloads.html">Downloads</a></li>
      <li><a href="sc.html">Study Center</a></li>
      <li><a href="events.html">Events</a>
        <ul>
          <li><a href="ongoing.html">Ongoing</a></li>
          <li><a href="upcoming.html">Upcoming</a></li>
          <li><a href="result.html">Results</a></li>
        </ul>
      </li>
      <li><a href="registration.html">Registration</a></li>
      <li><a href="contactus.html">Contact Us</a></li>
      <li class="last"><a href="gallery.html">Gallery</a></li>
    </ul>
    <div  class="clear"></div>
  </div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper row4">
  <div id="container" class="clear">
    <!-- ####################################################################################################### -->
    <div id="content">
      <h1 ><b><u><a href="events.html">Events </a></u>>><u><a href="registration.html">Registration</a></u></b></h1>
      <h1>Registration for the events</h1>
      <img class="imgr" src="images/demo/registration.jpg" alt="" width="125" height="125" />
      <p>CWMag group provides you the service of online registration for the events. Also you can register via sending sms to +919812211132 or either contact any of the CWMag member. </p>
      <p><b>SMS Format for registration is:-</b></p>
      <p>Event Name</p>
      <p>Name </p>  
      <p>Year</p>
      <p>Branch </p>
      <p>Contact No.</p><br><br>
      <h1>Apply Online</h1>
      <form name="afm_form_6ddfb7ac" id="afm_form_6ddfb7ac" action="registration.php" method="POST" style="margin: 0px">
<table border="0" cellpadding="6" cellspacing="0" style="text-align: left; border: 4px solid #7090B0; border-collapse: collapse" width="1%" bgcolor="#F0F0F0"><tr>
<td colspan="2" bgcolor="#7090B0" style="font-size: 14px; font-family: Verdana; color: #FFFFFF; font-weight: bold; padding: 4px">CWMag Registration Form</td>
</tr><tr>
<td colspan="2" style="padding: 8px; font-size:11px; font-family: Verdana; color: #000000">Questions marked by * are required.</td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">1.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Name: *<br><input type="Text" name="Name:" value="name" size="79" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">2.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Email: *<br><input type="Text" name="Email:" value="email"size="79" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">3.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Roll No. *<br><input type="Text" name="Roll No." value="roll_no" size="79" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">4.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Branch *<br><select style="font-family: Verdana; font-size: 11px" size="1" name="Branch"><option value="" selected>-</option><option>CSE</option><option>ME</option><option>ECE</option><option>ET</option><option>CHEM</option><option>CIVIL</option><option>BME</option><option>BT</option><option>B.Arch</option><option>Others</option></select></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">5.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Year *<br><select style="font-family: Verdana; font-size: 11px" size="1" name="Year"><option value="" selected>-</option><option>1</option><option>2</option><option>3</option><option>4</option><option>Other</option></select></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">6.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Contact No.<br><input type="Text" name="Contact No." size="79" style="font-size: 11px; font-family: Verdana"></td>
</tr><tr>
<td width="1%"  style="font-size: 30px; font-family: Verdana; color: #C0C0C0; font-weight: bold; padding-left: 20px" valign="top" align="right">7.</td>
<td width="99%" style="font-size: 11px; font-family: Verdana; font-weight: bold;  padding-right: 20px; color: #000000">Events *<br><ul style="margin: 0px; margin-top: 2px; padding: 0px; list-style: none; font-weight: normal;"><li style="margin: 0px; padding: 0px; list-style: none; font-weight: normal;"><input type="checkbox" name="Events" value="Rule the IT World"> Rule the IT World</li></ul></td>
</tr><tr>
<td colspan="2" align="center" style="padding: 8px"><input type="submit" name="submit" value="Submit" style="font-size: 11px; font-family: Verdana"> &nbsp;<input type="reset" name="reset" value="Reset" style="font-size: 11px; font-family: Verdana"></td>
</tr>
</table></form>
<h5> <b>Note: </b>Registration will be done within 24 hours of registration</h5>
      <?php
      $name=$_POST['Name:'];
      
      $roll=$_POST['roll_no'];
      $branch=$_POST['Branch'];
    
      
      ?>
      <h2>Registered Students For <a href="auditions.html">Auditions</a></h2>
      <table summary="Summary Here" cellpadding="0" cellspacing="0">
        <thead>
          <tr>
            <th>Serial No.</th>
            <th>Name</th>
            <th>Branch</th>
            <th>Roll no</th>
          </tr>
        </thead>
       <tbody>
          <tr class="light">
            <td>1</td>
            <?php echo"<td>".$name."</td>";?>
           <?php echo"<td>".$branch."</td>";?>
            <?php echo"<td>".$roll."</td>";?>
          </tr>
          
        </tbody>
      </table>
      
    
  </div>
      
    <div id="column">
      <div class="subnav">
        <h2>Quick Links</h2>
        <ul>
          <li><a href="alumni.html">Alumni</a></li>
          <li><a href="sc.html">Study Center</a>
            <ul>
              <li><a href="sc.html">Event Stuff</a></li>
              <li><a href="gs.html">Global News</a></li>
            </ul>
          </li>
          <li><a href="events.html">Events</a>
            <ul>
              <li><a href="ongoing.html">Ongoing Events</a></li>
              <ul>
                  <li><a href="oev1.html">CWMag Day</a></li>
                  <li><a href="oev1.html">Poster Making Competetion</a></li>
                </ul>
              <li><a href="upcoming.html">Upcoming Events</a>
                <ul>
                  <li><a href="ev1.html">Rule the IT-World</a></li>
                  
                </ul>
              </li>
            </ul>
          </li>
          <li><a href="result.html">Results</a></li>
        </ul>
      </div>
      <div class="holder">
        <h2 class="title"><img src="images/demo/osm.jpg" alt="" />Online Study Material</h2>
        <p>CWMag is providing online study material for the students besides latest technological news.</p>
        <p class="readmore"><a href="sc.html">Continue Reading &raquo;</a></p>
      </div>
      <div id="featured">
        <ul>
          <li>
            <h2>Rule the IT World</h2><br>
            <div class="imgl"><a href="ev1.html"><img src="images/demo/ln1.jpg" alt="" /></a></div>
            <p>All students are informed that CWMag group is about to organise an general awareness event on

topics related to Computer Science. Lets see who actually &quot;RULES

THE IT WORLD&quot;.</p>
            <p class="readmore"><a href="ev1.html">Continue Reading &raquo;</a></p>
          </li>
        </ul>
      </div>
      <div class="holder">
        <marquee><h2>Apple AirPlay expected to debut in Sept</h2></marquee>
        <p>Tech giant Apple is gearing up for the launch of a new 'AirPlay Direct' technology, which would allow wireless music playback without the need of a Wi-Fi network.</p>
        <p class="readmore"><a href="gs1.html">Continue Reading &raquo;</a></p>
      </div>
    </div>
    <!-- ####################################################################################################### -->
    <div class="clear"></div>
  </div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper row5">
  <div id="footer" class="clear">
    <!-- ####################################################################################################### -->
    <div class="foot_contact">
      <h2>Deenbandhu Chhotu Ram University Of Science And Technology</h2>
      <h4><a href="http://www.dcrustm.ac.in">www.dcrustm.ac.in</a></h4>
      <h4><a href="http://www.dcrustm.org">www.dcrustm.org</a></h4>
      <address>
      Murthal, Sonepat (Haryana) -131039<br>
      <strong>Tel:</strong> 01302484003,
      <strong>Fax:</strong> 0130-2484004<br>
      <strong>Email:</strong>cwmagdcrust@gmail.com
      </address>
    </div>
    <div class="footbox">
      <h2>Administration</h2>
      <ul>
        <li><a href="alumni.html">Alumni</a></li>
        <li><a href="sitemap.html">Sitemap</a></li>
        <li><a href="contactus.html">Contact Us</a></li>
        <li class="last"><a href="http://www.dcrustm.ac.in">dcrustm.ac.in</a></li>
      </ul>
    </div>
    <div class="footbox">
      <h2>Information</h2>
      <ul>
        <li><a href="cwmag.html">About Us</a></li>
        <li><a href="events.html">Events</a></li>
        <li><a href="sc.html">Study Center</a></li>
        <li class="last"><a href="helpdesk.html">Help Desk</a></li>
      </ul>
    </div>
    <div class="footbox last">
      <h2>Gallery</h2>
      <ul>
        <li><a href="downloads.html">Downloads</a></li>
        <li><a href="pg.html">Photos</a></li>
        <li><a href="vg.html">Vidoes</a></li>
        <li class="last"><a href="upload.html">Upload</a></li>
      </ul>
    </div>
    <!-- ####################################################################################################### -->
  </div>
</div>
<!-- ####################################################################################################### -->
<div class="wrapper">
  <div id="copyright" class="clear">
    <p class="fl_left">Copyright &copy; 2011 - All Rights Reserved - <a href="index.html">www.cwmag.cu.cc</a></p>
   <p class="fl_right">Template by <a href="http://www.os-templates.com/" title="Free Website Templates">OS Templates</a></p>
  </div>
</div>
<script type="text/javascript">$('.slidedeck').slidedeck();</script>
</body>



Is This A Good Question/Topic? 0
  • +

Replies To: PHP + HTML FORM + HTML TABLE

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8915
  • View blog
  • Posts: 33,430
  • Joined: 12-June 08

Re: PHP + HTML FORM + HTML TABLE

Posted 21 September 2012 - 08:22 AM

Moving from 'share you project' to 'web dev help'.
Was This Post Helpful? 0
  • +
  • -

#3 jacko900000  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 13-September 12

Re: PHP + HTML FORM + HTML TABLE

Posted 23 September 2012 - 09:42 AM

You could make it so it says "Somebody already has that name" ?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1