School Event Registration

School Event Registration System will show you how to create this simple project. This system creates a registration form for all the user's to fill up the form and creates a record of each users details who had been registered. And it is useful for different kind of event to track every users that they are in the record or list of registered member. This project is compose of PHP, Bootsrap, Javascript, Modal and MySQL, this programs are written in a way that any one can understand and customize for their own and personal projects.

Sample Code

Index.php - Script for registering a member from the system through the database.
  1. <?php
  2. if (isset($_POST['submit'])){
  3. $fn=$_POST['fn'];
  4. $ln=$_POST['ln'];
  5. $age=$_POST['age'];
  6. $gender=$_POST['gender'];
  7. $address=$_POST['address'];
  8. $email=$_POST['email'];
  9. $c_number=$_POST['c_number'];
  10.  
  11. mysql_query("insert into reg_member (firstname,lastname,age,address,gender,email,c_number,date)
  12. values('$fn','$ln','$age','$address','$gender','$email','$c_number',NOW())")or die(mysql_error());
  13. ?>
  14. <script type="text/javascript">
  15. alert('You Are Successfully Registered Thank You');
  16. window.location="index.php";
  17. </script>
  18. <?php
  19. }
  20. ?>
And for the UI Design of the Member Registration.
  1. <nav class="navbar navbar-default">
  2. <div class="container-fluid">
  3. <div class="navbar-header">
  4. <a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
  5. </div>
  6. <ul class="nav navbar-nav">
  7. <li class="active"><a href="index.php">Home</a></li>
  8. <li><a href="#">About</a></li>
  9. <li><a href="#">Contact Us</a></li>
  10. </ul>
  11. </div>
  12. </nav>
  13. <div class="container">
  14. <h2 align="center">School Event Registration</h2><hr>
  15. <p align="center" style="color:#fff">Fill Up All The Details Below!</p>
  16. <form class="form-horizontal" method="POST">
  17. <div class="form-group">
  18. <label class="control-label col-sm-2" for="inputEmail">FirstName:</label>
  19. <div class="span4">
  20. <input type="text" name="fn" class="form-control" id="inputEmail" placeholder="FirstName" required>
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="control-label col-sm-2" for="inputEmail">LastName:</label>
  25. <div class="span4">
  26. <input type="text" name="ln" class="form-control" id="inputEmail" placeholder="LastName" required>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="control-label col-sm-2" for="inputEmail">Age:</label>
  31. <div class="span4">
  32. <input type="text" name="age" class="form-control" id="inputEmail" placeholder="Age" required>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="control-label col-sm-2" for="inputEmail">Gender:</label>
  37. <div class="span4">
  38. <select class="span2" name="gender" required>
  39. <option></option>
  40. <option>Male</option>
  41. <option>Female</option>
  42. </select>
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. <label class="control-label col-sm-2" for="inputEmail">Address:</label>
  47. <div class="span4">
  48. <input type="text" name="address" class="form-control" id="inputEmail" placeholder="Address" required>
  49. </div>
  50. </div>
  51. <div class="form-group">
  52. <label class="control-label col-sm-2" for="inputEmail">Email:</label>
  53. <div class="span4">
  54. <input type="text" name="email" class="form-control" id="inputEmail" placeholder="Email" required>
  55. </div>
  56. </div>
  57. <div class="form-group">
  58. <label class="control-label col-sm-2" for="inputEmail">Contact Number:</label>
  59. <div class="span4">
  60. <input type="text" name="c_number" class="form-control" id="inputEmail" placeholder="Contact Number" required>
  61. </div>
  62. </div>
  63. <div class="form-group">
  64. <div class="col-sm-offset-2 col-sm-10">
  65. <button type="submit" name="submit" class="btn btn-primary">Submit</button>
  66. </div>
  67. </div>
  68. </form>
And For The Admin Side. We put all the forms in one location and then creating a link to each form so the code will be shorten and it will be easy to use and understand by the user. Home.php - This form is compose of php script to make the code short and call every sessions by the syntax of php function.
  1. <?php
  2. include('header.php');
  3. include('session.php');
  4. ?>
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <title>School Event Registration</title>
  9. </head>
  10. <body>
  11. <nav class="navbar navbar-default">
  12. <div class="container-fluid">
  13. <div class="navbar-header">
  14. <a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
  15. </div>
  16. <ul class="nav navbar-nav">
  17. <li class="active"><a href="index.php">Home</a></li>
  18. <li><a href="#">About</a></li>
  19. <li><a href="#">Contact Us</a></li>
  20. </ul>
  21. </div>
  22. </nav>
  23. <h1 align="center">School Event Registration</h1>
  24. <div class="container">
  25. <div class="row-fluid">
  26. <div class="span12">
  27. <ul id="myTab" class="nav nav-tabs">
  28. <li class="active"><a href="#member" data-toggle="tab"><i class="icon-group icon-large"></i>&nbsp;Registered Member</a></li>
  29. <li><a href="#user" data-toggle="tab"><i class="icon-user icon-large"></i>&nbsp;User</a></li>
  30. <li>
  31. <a data-toggle="modal" data-target="#myModal"><i class="icon-signout icon-large"></i>&nbsp;Logout</a>
  32. </li>
  33. </ul>
  34. </div>
  35. </div>
  36. <div class="tab-content">
  37. <?php
  38. include('tab_member.php');
  39. ?>
  40. <?php
  41. include('tab_user.php');
  42. ?>
  43. </div>
  44. <?php
  45. include('modal.php');
  46. ?>
  47. </div>
  48. </body>
  49. </html>
ResultHope that you learn in this tutorial. And for more updates and programming tutorials don't hesitate to ask and we will answer your questions and suggestions. Don't forget to LIKE & SHARE this website.

Comments

Submitted byManifresh (not verified)on Tue, 11/22/2016 - 21:50

thanks alot for ur help
Submitted bytesfayee (not verified)on Thu, 11/24/2016 - 01:45

it is very naice

Add new comment