Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit']))
- {
- $uname = $_POST['username'];
- $pass = $_POST['password'];
- $gender = $_POST['gender'];
- $ag = $_POST['age'];
- $mail = $_POST['mail'];
- $city = $_POST['city'];
- $con = mysqli_connect("localhost","root","","mscit");
- if(!$con)
- {
- die("Error".mysqli_error());
- }
- //insert into table_name values('username','password','gender',00,'city','mail');
- $dbq = "insert into login value('$uname','$pass','$gender',$ag,'$city','$mail')";
- mysqli_query($con, $dbq);
- echo "<p> Record Inserted.";
- mysqli_close($con);
- }
- else
- {
- echo "Enter Details First.";
- header('Location: Form.html');
- }
- ?>
Add Comment
Please, Sign In to add comment