mysql - PHP checks if username and password exists at login form -


hello new @ php , mysql. please me , tell why above code not working. thank in advance.

<?php ob_start(); $user=$_post['username']; $pass=$_post['password']; $con=mysqli_connect("localhost","root","","login"); if($con == false){     die("error: not connect. " . mysqli_connect_error()); } $sql= "select * userinfo userid = '".$user."' , password = '".$pass."';"; $result = mysqli_query($con,$sql); if(mysql_num_rows($result)==1){     header("location: page1.html");     exit(); }    else{ echo "try again"; } ?>   


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -