Jump to content

إستفسار PHP


Recommended Posts

On 31/01/2019 at 03:53, A7M8D said:

اتمني فهمتوني انا حولت ب MySQL لكني فشلت

<?php
$con=mysqli_connect(...yourinfo);
$email=htmlspecialchars($_POST['email']);

if($con){
  
 	$query=mysqli_query($con,"SELECT * FROM `table_name` WHERE `email_col_name`='$email'");	
  	$f=mysqli_fetch_assoc($query);
  
  	if(mysqli_num_rows($query)<=0){return false;}else{
  	
  echo $f['username_col_name'];}
  
}else{
echo mysqli_error($con);
}
?>

بالتوفيق

Edited by Master_MTA
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...