hey guys please help me i am having this error when i tried to connect with my DB.
Fatal error: Can't use function return value in write context in C:\wamp\www\ipsem6\include\membersite_config.php on line 20
Below is My Code`
$host="localhost";
$username="root";
$password="";
$link=mysqli_connect($host,$username,$password,"a8172058_portal");
if(isset($_POST["submit"]))
{
$name=$_POST["name"];
$email=$_POST["email"];
$username=$_POST["username"];
$pass=$_POST["password"];
$contactno=$_POST["contact1"];
$cont2=$_POST["contact2"];
$dob=$_POST["date"];
$role=$_POST["rle"];
$gender=$_POST["s"];
$qry="insert users values('$name','$email','$username','$pass','$contactno','$cont2','$dob','$role','$gender')";
$res=mysqli_query($link,$qry);
if(mysqli_query_rows($link)=false)
{
echo 'you have registered successfully';
}
else
{
echo 'registration failed';
}
?>`
I checked so many solution but not able to understand them because am not so good in Data Base Programming..! Please help me to sole it as i have to submit my project tomorrow. :/