Deprecated: Function create_function() is deprecated in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/plugins/wp-automatic/wp-automatic.php on line 70

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; COUNT_CLASS has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/functions.php on line 1713

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; sidebar_generator has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/plugins/multiple_sidebars.php on line 29

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_video_widgets has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/video.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_soundcloud has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/soundcloud.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_counter_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/social-counter.php on line 9

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_news_in_pic has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/new-in-pic.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Flickr_Widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/flickr.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_fb_likebox has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/fb.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_google_follow has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/google-follow.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_popular has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/popular-posts.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_recent_posts has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/recent-posts.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_cate_posts has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/category-posts.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; tabs_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/tabs.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_youtube_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/youtube-subscribe.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_social_links has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/social-links.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_comments_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/comments.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_author_bio has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/bio-author.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_login has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/login.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_search_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/search.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Ad_120_600_Widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/ads120.php on line 7

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Ad_125_125_Widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/ads125.php on line 7

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Ad_250_250_Widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/ads250.php on line 7

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Ad_300_300_Widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/ads300.php on line 7

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_tweets_load has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/twittes.php on line 10

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; feedburner_widget has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/newsletter.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_related has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/related.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_slider has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/slider.php on line 6

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; bd_top_rate has a deprecated constructor in /var/www/vhosts/eduardoarellano.com/d4mations.com/wp-content/themes/renad/includes/widgets/top-review.php on line 6
PHP & MySQL Tutorial – 68: Creating a Signup Page | D4mations.com
  • Tuesday , 19 January 2021

PHP & MySQL Tutorial – 68: Creating a Signup Page

Code Canyon



Thanks for watching! Check out my other tutorials at: https://www.youtube.com/user/madhurbhatia89?feature=guide.

Original source

3d Ocean

Related Posts

20 Comments

  1. mehedi hasan
    December 23, 2017 at 07:29

    Awsome Tutorial,thnx dear

  2. Daniel Sousa
    December 23, 2017 at 07:29

    The best!!!

  3. Saikrishna Katkuri
    December 23, 2017 at 07:29

    thank you so much sir

  4. Harpreet Rattu
    December 23, 2017 at 07:29

    HELLO SIR; is it necessary to pass the value to other php page to insert value in database ?

  5. neeraj singh
    December 23, 2017 at 07:29

    Many many thanx…..😇

  6. Interesting Gaming HD
    December 23, 2017 at 07:29

    are u in a cave it's so echoe

  7. Friday Islam
    December 23, 2017 at 07:29

    sir you should make a complete website like abdul wali makes

  8. Toni Romero
    December 23, 2017 at 07:29

    Good tutorial. Can the code for be found somewhere?

  9. JCL Trading Company
    December 23, 2017 at 07:29

    You are a wonderful tutor and I liked the way you have explained here. I am new to Php and I am in very beginner level. I created the file but unfortunately it doesn't work. Gives me following error
    "Query Failed!Column count doesn't match value count at row 1"

    I did this almost everything based on this. If possible, would you please look on to this. Let me post my file codes here HTML and Php
    My HTML File with forms here.

    <div="container">
    <div="row">
    <div class="col-md-5">
    <a href="index.php"><h1>MyRoar</h1></a>

    </div>
    </div>
    </div>

    <div="container">
    <div="row">
    <div class="col-md-12">
    <div class="well well-lg">
    <h1>Register Here</h1>

    <div class='container'> <div class='container-fluid'> <div class='well'>
    <form class='form-horizontal' action='register_success.php' method='POST'>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> First Name:</label>
    <div class='col-sm-9'>
    <input type='text' name= 'first_name' class='form-control' id='firstname' placeholder='First Name'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> Last Name:</label>
    <div class='col-sm-9'>
    <input type='text' name= 'last_name' class='form-control' id='firstname' placeholder='First Name'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> Enter Email Address:</label>
    <div class='col-sm-9'>
    <input type='email' name= 'email' class='form-control' id='first' placeholder='Email Address'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> Gender:</label>
    <label class='control-label col-sm-1' for='male'> Male</label>
    <div class='col-sm-3'>
    <input type='radio' name= 'gender' value='male' class='form-control' > </div>
    <label class='control-label col-sm-1' for='female'> Female</label>
    <div class='col-sm-3'>
    <input type='radio' name= 'gender' value='female' class='form-control' > </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='pwd'> Enter Password:</label>
    <div class='col-sm-9'>
    <input type='password' name= 'password' class='form-control' id='pwd' placeholder='Password'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='pwd'> Confirm Password:</label>
    <div class='col-sm-9'>
    <input type='password' name= 'confirm_password' class='form-control' id='pwd' placeholder='Confirm Password'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> Country living in:</label>
    <div class='col-sm-9'>
    <input type='text' name= 'country' class='form-control' id='lastname' placeholder='Country'>
    </div>
    </div>

    <div class='form-group'>
    <label class='control-label col-sm-3' for='first'> Phone Number With Area Code:</label>
    <div class='col-sm-9'>
    <input type='tel' name= 'phonenumber' class='form-control' id='lastname' placeholder='Phone Number'>
    </div>
    </div>

    <div class='form-group'>
    <div class='col-sm-offset-2 col-sm-10'>
    <button type='submit' id='signupbtn' class='btn btn-success'>Submit</button>
    </div>
    </div>
    </form>
    </div>
    </div>
    </div>

    </div>
    </div>
    </div>
    </div>

    Then my Php Files with Php codes in here

    <?php
    include 'header.php';

    ?>

    <?php

    $host ="localhost";
    $dbuser="root";
    $pass="";
    $dbname="test";
    $conn=mysqli_connect($host, $dbuser, $pass, $dbname);
    if (mysqli_connect_errno()) {
    die ("Connection Failed". mysqli_connect_errno());
    }

    ?>
    <?php

    if (isset($_POST['submit']));{
    $first=$_POST['first_name'];
    $last=$_POST['last_name'];
    $email=$_POST['email'];
    $gender=$_POST['gender'];
    $password=$_POST['password'];
    $name=$first.$last;
    $repass=$_POST['confirm_password'];
    if (empty($first)){
    echo "Please Fill in All the Fields";
    }

    if (empty($last)){
    echo "Please Fill in All the Fields";
    }
    if (empty($email)){
    echo "Please Fill in All the Fields";
    }
    if (empty($gender)){
    echo "Please Fill in All the Fields";
    }
    if (empty($password)){
    echo "Please Fill in All the Fields";
    }

    if (empty($password)){
    echo "Please Fill in All the Fields";
    }

    elseif ($password!=$repass) {
    echo "Passwords didn't match, please try again.";

    }
    else {
    $sql="INSERT INTO users(FirstName, LastName, email, gender,password, country, Phonenumber)".
    "VALUES ('$first', '$last', '$email', '$gender', '$password')";
    $result=mysqli_query($conn, $sql);
    if (!$result){
    die ("Query Failed!". mysqli_error($conn));

    }
    else {
    echo "You are almost there, upload your resume";
    }
    }
    }

    ?>

  10. AMEET KARKI
    December 23, 2017 at 07:29

    broder can u pls snd d source code for signuppage _destination.

  11. Vertigo
    December 23, 2017 at 07:29

    what about sign in

  12. Vertigo
    December 23, 2017 at 07:29

    why not instead of loading a new page for every error make a pop up

  13. Akash Gupta
    December 23, 2017 at 07:29

    This video is awesome.
    Working fine had some errors but you can find them easily.
    Thank You

  14. AutoPilot69
    December 23, 2017 at 07:29

    Hi man, great tutorials but i keep getting an error with :
    Parse error: syntax error, unexpected '$conn' (T_VARIABLE). Could you please help? Thanks

  15. Mohammed Islam
    December 23, 2017 at 07:29

    after registering, instead of echoing data complete, How would you direct them to their account page?

  16. Mole Bannana
    December 23, 2017 at 07:29

    help! i keep getting server error 500.

    <html >
    <head>
    <meta charset="UTF-8">
    <title>background</title>

    <link rel="stylesheet" href="css/style.css">
    <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>

    <script src="js/index.js"></script>

    </head>

    <body>

    <div class="container demo-1">

    <div class="content">

    <div id="large-header" class="large-header" style="height: 760px;">

    <form method="POST" action="" >
    <div class="box">

    <h1 id="logintoregister">Login</h1>

    <div class="group show">
    <input class="inputMaterial" type="text" name="FirstName" required>
    <span class="highlight"></span>
    <span class="bar"></span>
    <label>First Name</label>
    </div>
    <div class="group show">
    <input class="inputMaterial" type="text" name="Surname" required>
    <span class="highlight"></span>
    <span class="bar"></span>
    <label>Surname</label>
    </div>

    <div class="group ">
    <input class="inputMaterial" type="text" name="Email" required>
    <span class="highlight"></span>
    <span class="bar"></span>
    <label>Email</label>
    </div>

    <div class="group">
    <input class="inputMaterial" type="password" id="password" name="Password" required>
    <span class="highlight"></span>
    <span class="bar"></span>
    <label>Password</label>
    </div>
    <div class="group show">
    <input class="inputMaterial" type="password" id="confirm_password" required>
    <span class="highlight"></span>
    <span class="bar"></span>
    <label>Confirm Password</label>
    </div>

    <button ><input id="buttonlogintoregister" type = "submit" value="submit" name="submit">Login</button>
    <p id="plogintoregister">By registering, You accept all terms and conditons </p><p id="textchange" onclick="register()"> Sign Up</p>

    </form>

    <?php

    $host="xxx";
    $dbuser="xxx";
    $pass="xxx";
    $dbname="xxx";
    $conn=mysqli_connect($host, $dbuser, $pass, $dbname);
    if(mysqli_connect_errno())
    {
    die("connection Fails" . mysqli_connect_error());
    }

    if(isset($_POST['submit'] && !empty($_POST['submit']))

    {

    $FirstName=$_POST['FirstName'];
    $Surname=$_POST['Surname'];
    $Email=$_POST['Email'];
    $Password=$_POST['Password'];

    $sql="INSERT INTO Users(FirstName,Surname,Email,Password)" .
    "VALUES($FirstName','$Surname','$Email','$Password')";
    $res=mysqli_query($conn, $sql);
    if(!$res)
    {
    die("Query Failed! " . mysqli_error($conn));

    }
    else
    {

    echo "Data inserted successfully!";

    }

    }
    mysql_close();
    ?>

    <!– Related demos –>

    </body>
    </html>

  17. Michael LaCreta
    December 23, 2017 at 07:29

    finally a tutorial with easy to read code and no Dreamweaver thank you!

  18. Unathi Gxarisa
    December 23, 2017 at 07:29

    Just what I've been looking for for weeks, months and years.

    I am sharing this!!

  19. TheOutABoy
    December 23, 2017 at 07:29

    You are now my favourite human being, thankyou

  20. Eldose Joy
    December 23, 2017 at 07:29

    could you create a video how to send  out contact info that you collected on the form to the personal email?

Leave A Comment

You must be logged in to post a comment.