Hello,
I hope that I can get some help here as I have been trying to fix this all day and I think I am going to go mental soon
Error:
Warning: mysql_result() expects parameter 1 to be resource, string given in /home/cobblecr/public_html/index.php on line 17
Code:
<form id="form1" name="index.php" method="GET" action="">
<p>Username:
<label for="usernames"></label>
<input type="text" name="username" id="usernames" />
</p>
<p>
<input type="submit" name="Enter" id="Enter" value="Search" />
</p>
</form>
<?php
include 'connect.php';
$search = $_GET['username'];
echo $search;
$query = "SELECT `balance` FROM `cobblecr_minecraft` WHERE 'username = $search' LIMIT 0, 30 " or die(mysql_error());
mysql_result( $query, 0, 'username');
echo $data;
die()
?>
Thanks
Matthew