Have got a database with column as
Username Password Chain Name
12345 12345 ASDFG
12345 12345 QWERT
12345 12345 ZXCVB
I am taking Username and Password as input from the user and want to display all the Chain Name associated with this username and password.
Uploading the PHP for same.
<?php
include('includes/config.php');
if(isset($_POST['userid'],$_POST['pid'])){
$userid = trim($_POST["userid"]);
$pid = trim($_POST["pid"]);
$sql = "SELECT * FROM tbl_store WHERE username = '$userid' ";
$result = mysqli_query($conn,$sql);
$rowcount=mysqli_num_rows($result);
echo "$rowcount";
$row = mysqli_fetch_array($result);
echo "Store code".'<br/>';
echo $row['Chain_Name'].'<br/>'.'<br/>';
}
?>
Kindly suggest what needs to be done to get all the Chain Name.
}in this PHP code?