$getm="SELECT player FROM manutd WHERE player='$x'";
$get=$mysqli->query($getm,MYSQLI_USE_RESULT);
while($row=$get->fetch_object())
{
$name=$row->player;
}

is there anything wrong with this code.........................plz help

can there be error in connection with the database ..............

the syntax you are using implies you are trying to use a class instance with the var $mysqli. when you are trying to run the "query()" function its trying to find that function in that class.

if you are not trying to use a class, use

mysql_query($queryhere);

or something like that

after a second look i realized that your entire code is wrong (if you are not using a class)

try using:

<?php

$con = mysql_connect('localhost','user','pass');
mysql_select_db('db');

$sql = "SELECT `player` FROM `manutd` WHERE `player` = '{$x}'";
$query = mysql_query($sql,$con);
while ($row = mysql_fetch_assoc($query)) {
    $name = $row['player'];
}


?>

?????but my code is working on localhost but wen i try it on www it gives this error.........
i will try your method..............i hope this shud work.......

i cant get it right......................
this is killin me.........
Warning: mysqli_connect() [function.mysqli-connect]: XXXX: Access denied for user (using password: YES)
........plz help.......even the include file is gettin over me ........
can u help where might i b wrong......i not even able to connect to the data base.....the warning is hittin me

This article has been dead for over six months. Start a new discussion instead.