php LOGIN script

Posted In PHP
  • jack-nicholson 3 years ago

    Doubt regarding php loginscript video

    what does this error mean

    Notice: Only variables should be passed by reference in C:\xampp\htdocs\phplogin\register.php on line 22

  • krisztián-kecskés 3 years ago

    Can you show us the 22. line of your code in the register.php?

  • kwabena-ampofo 3 years ago

    Having the same trouble as well

    Mine is on line 10

    here's my code

    <?php 
    	
    	require 'database.php';
    	if (!empty($_POST['email']) && !empty($_POST['password'])){
    		# code...
    		$sql = "INSERT INTO users(email, password) VALUES (:email, :password)";
    		$stmt = $conn->prepare($sql);
    
    		$stmt->bindParam(':email', $_POST['email']);
    		$stmt->bindParam(':password', password_hash($_POST['password'], PASSWORD_BCRYPT));
    	
    		if ($stmt->execute()) {
    			# code...
    			die('Success');
    		}
    		else{
    			die('Failed to Connect');
    	}
    }
    ?>
    <html>
    <head>
    	<title>Register</title>
    	<link rel="stylesheet" type="text/css" href="style.css">
    </head>
    <body>
    	<header>
    		<h1>Create an Account</h1>
    		<p>or 
    		<a href="login.php">Login</a>
    		</p>
    		
    		<p><a href="index.php">Cancel</a></p>
    	</header>
    	
    	<form action="register.php" method="POST">
    		<input type="text" placeholder="Enter your Email" name="email">
    		<input type="password" placeholder="Enter a password" name="password">
    		<input type="password" placeholder="Confirm your password" name="password">
    		<input type="submit" value=Register>
    	</form>
    </body>
    </html>
  • baljeet-sidhu 2 years ago
    <form action="register.php" method="POST">
    		<input type="text" placeholder="Enter your Email" name="email">
    		<input type="password" placeholder="Enter a password" name="password">
    		<input type="password" placeholder="Confirm your password" name="password">
    		<input type="submit" value=Register>
    	</form>**ddd**
  • louis-roth 3 months ago
    Reliable controls and measures have been done for the approval for the future times. It is done for the use of the [writingessayeast](https://legitimate-writing-services.blogspot.com/2018/10/writingessayeastcom-review.html) for the production for the humans. The users are wide spread for the fitness and all acute moves for the citizens.

    Reliable controls and measures have been done for the approval for the future times. It is done for the use of the writingessayeast for the production for the humans. The users are wide spread for the fitness and all acute moves for the citizens.

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
Want to create your own SAAS?

I can teach you to create your own Software as a Service. Click here to learn more!

Visit SAAS Adventure!