Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'conn.php';
- session_start();
- $name = $_POST['name'];
- $username = $_POST['username'];
- $email = $_POST['email'];
- $pass = $_POST['password'];
- $country = $_POST['country'];
- $child = $_POST['child_no'];
- if (!empty($name) && !empty($username) && !empty($email) && !empty($pass) ) {
- $sql = "INSERT INTO user (name, user_name, email, password, country, no_of_child)
- VALUES ('$name', '$username', '$email', '$pass', '$country', '$child')";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- $_SESSION['succMsg'] ="You have signed up successfully";
- header('location: clientlogin.php');
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- }
- else{
- $_SESSION['errMsg'] = "You must have to fill all Fields !";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement