Help me please! How to

How to get a variable script and put in a php variable?

 <?php
    $query = mysqli_query($con, "SELECT * FROM user WHERE email='$email'");
    if($GET['$email1'] == $email) {
        $result = mysqli_fetch_assoc($query);
        $_SESSION['id_user'] = $result['id_user'];
        $_SESSION['username'] = $result['username'];
        $_SESSION['email'] = $result['email'];
    }
    ?>

Please elaborate further :slight_smile:

Is that a PHP script for a form on your website? If so, make sure you include the html code below it. :grinning:

This is a complete guess, but if you’re using the Zyro site builder, judging by the looks of the script (looks like a registration form that is email-based) you will either want to put it somewhere in phpmailer in files.000webhost.com if you will need to send email to the user or in 1.php if just an ordinary account form (this is where my comment form went, which uses Google account logins, so I’m guessing that a account creation form might work as well) Also, the staff above me will be able to help you better with your issue if you provide more information. :smiley:

1 Like