Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname= "test";
- $conn = new mysqli($servername,$username,$password,$dbname);
- if($conn->connect_error){
- die("connection failed:" .$conn->connect_error);
- }
- else{
- echo "Connected successfully";
- }
- $selected = mysqli_select_db($conn,$dbname);
- $first_name = $_POST['first_name'];
- $last_name = $_POST['last_name'];
- $email = $_POST['email'];
- $mobile = $_POST['mobile'];
- $address = $_POST['address'];
- //$gender = $_POST['male'];
- //$gender = $_POST['female'];
- $sql = "INSERT INTO test1 (first_name,last_name,email,mob,home_address) VALUES ('$first_name','$last_name','$email','$mobile','$address')";
- var_dump($sql);
- ?>
Add Comment
Please, Sign In to add comment