<html> <head> <h3> College fest Organising Group </h3></head> <body> <h5>Register, n be a part of the group!</h5> <a href="registration.php"> Register </a></br> <h5>Login, as a member</h5> <a href="login.php"> Login </a></br> </body> </html>
<html> <head><title> Registration Form</title></head> <body> <h3> Register here!</h3> <form name="registration" method="POST" action=""> <table> <tr> <td>Name:</td> <td><input type="text" name="Name" ></td> </tr> <tr> <td>Department:</td> <td><input type="text" name="Department" ></td> </tr> <tr> <td>Roll_No:</td> <td><input type="text" name="Roll_No" ></td> </tr> <tr> <td>Telephone_No:</td> <td><input type="text" name="Telephone_No" ></td> </tr> <tr> <td>CGPA:</td> <td><input type="text" name="CGPA" ></td> </tr> <tr> <td>Committee(Choose only 1):</td> <td><select name="Committee"> <option value="D"> Dance--D </option> <option value="DR"> Drama--DR </option> <option value="M"> Music--M </option> <option value="H"> Hospitality--H </option> <option value="S"> Stage--S </option> </select> </td> </tr> <tr> <td>Password:</td> <td><input type="Password" name="Password" ></td> </tr> </table> <input type="submit" value="Submit"> </form> <p> Thank you! </p> </body> </html>
<?php $name=$_POST['Name']; $department=$_POST['Department']; $roll_No=$_POST['Roll_No']; $telephone_No=$_POST['Telephone_No']; $CGPA=$_POST['CGPA']; $committee=$_POST['Committee']; $password=$_POST['Password']; mysql_connect("localhost", "root", "mysql11") or die(mysql_error()); echo "Connected to MySQL<br/>"; mysql_select_db("test") or die(mysql_error()); echo "Connected to Database"; $result=mysql_query("Insert into committee Values(\"$name\",\"$department\",\"$roll_No\",\"$telephone_No\",\"$CGPA\",\"$committee\",\"$password\")"); echo "Thankyou!"; ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)