Website marketing using high authority backlinks from popular website's, find out more at webcentreplus.com or email colin@webcentreplus.com
Click Here!

MLM(Multi Level Marketing) website using php part 16(E)- Join user

MLM(Multi Level Marketing) website using php part 16(E)- Join user. In this tutorial we shall insert data into table tree and delete the pin that is used. If this video helped you than you can pay me by using this link http://paypal.me/santoshdevnath

source – For all your website needs, visit out Spalding Web Design

6 Responses to MLM(Multi Level Marketing) website using php part 16(E)- Join user

  • Gaming sam says:

    testing successful but data not inserted

  • TeKNiK HuB says:

    Can i get fukl code of join user page

  • This is the problem am having, my data is submitting to the user table but it is not submitting to the tree table. is displaying this error. Field 'left' doesn't have a default value
    REPLY

  • If this video helped you than you can pay me by using this link http://paypal.me/santoshdevnath

  • Why I am not getting the data that filled in the form in my table 'user'.
    File name: join.php
    This is my code:

    <?php
    include('php-includes/connect.php');
    include('php-includes/check-login.php');
    $userid = $_SESSION['userid'];
    ?>
    <?php
    //User cliced on join
    if(isset($_GET['join_user'])){
    $side='';
    $pin = mysqli_real_escape_string($con,$_GET['pin']);
    $email = mysqli_real_escape_string($con,$_GET['email']);
    $mobile = mysqli_real_escape_string($con,$_GET['mobile']);
    $address = mysqli_real_escape_string($con,$_GET['address']);
    $account = mysqli_real_escape_string($con,$_GET['account']);
    $under_userid = mysqli_real_escape_string($con,$_GET['under_userid']);
    $side = mysqli_real_escape_string($con,$_GET['side']);
    $password = "123456";

    $flag = 0;

    if($pin!='' && $email!='' && $mobile!='' && $address!='' && $account!='' && $under_userid!='' && $side!=''){
    //User filled all the fields.
    if(pin_check($pin)){
    //Pin is ok
    if(email_check($email)){
    //Email is ok
    if(!email_check($under_userid)){
    //Under userid is ok
    if(side_check($under_userid,$side)){
    //Side check
    $flag=1;
    }
    else{
    echo '<script>alert("The side you selected is not availble.");</script>';

    }
    }
    else{
    //check under userid
    echo '<script>alert("Invalid Under userid.");</script>';

    }
    }
    else{
    //check email
    echo '<script>alert("This user id already availble.");</script>';
    }
    }
    else{
    //check pin
    echo '<script>alert("Invalid pin");</script>';
    }
    }
    else{
    //check all fields are fill
    echo '<script>alert("Please fill all the fields");</script>';
    }

    //Now we are heree
    //It means all the information is correct
    //Now we will save all the information
    if($flag==1){
    $query = mysqli_query($con,"insert into user('email','password','mobile','address','account') values('$email','$password','$mobile','$address','$account')");
    echo '<script>alert("Testing Success.");</script>';
    }

    }
    ?><!–/join user–>
    <?php
    //functions
    function pin_check($pin){
    global $con,$userid;

    $query =mysqli_query($con,"select * from pin_list where pin='$pin' and userid='$userid'");
    if(mysqli_num_rows($query)>0){
    return true;
    }
    else{
    return false;
    }
    }
    function email_check($email){
    global $con;

    $query =mysqli_query($con,"select * from user where email='$email'");
    if(mysqli_num_rows($query)>0){
    return false;
    }
    else{
    return true;
    }
    }
    function side_check($email,$side){
    global $con;

    $query =mysqli_query($con,"select * from tree where userid='$email'");
    $result = mysqli_fetch_array($query);
    $side_value = $result[$side];
    if($side_value==''){
    return true;
    }
    else{
    return false;
    }
    }
    ?>

    Sir, Why I am not getting the data in my table.

  • Nahid Chayan says:

    Sir i write this code: $query = mysqli_query($con,"UPDATE tree SET '$side'='$email' WHERE userid='$under_userid'"); But when i fill all form data and send than this massage show : You have an error in your SQL syntax; check the manual that corresponds
    to your MariaDB server version for the right syntax to use near
    'right='nahidchayan61@gmail.com' WHERE userid=nahidchayan@yahoo.com' at
    line 1 (I don't understand where is my problem) Please solve my code.

Leave a Reply

Archives