Trouble with php/mysql script

This is the script:

<?php
$mysqli = new mysqli("hidden", "hidden", "hidden", "hidden");

/* check connection */
if (mysqli_connect_errno()) {
echo"Connect failed: %s
", mysqli_connect_error();
exit();
}

$User = $_REQUEST['UserName'];
$query = "SELECT type, desc FROM uwl_items WHERE holder = $User";
echo $query;
$result = $mysqli->query($query);
echo $result;

while($row = mysqli_fetch_array($result, MYSQLI_NUM))
{
echo "";
}
?>



http://underworldlords.com/Inv.php?UserN

Comments

  • $query = "SELECT type, desc FROM uwl_items WHERE holder = $User";

    If holder is an string field, then you need to write quotes around $User.
  • $query = "SELECT type, desc FROM uwl_items WHERE holder = $User";

    If holder is an string field, then you need to write quotes around $User.
  • I think the best tutorial you will get for PHP, MySql and javascript is from w3schools. It is a very good source for learning programming languages and it also provides the ethical ways of structured programming.
  • I think the best tutorial you will get for PHP, MySql and javascript is from w3schools. It is a very good source for learning programming languages and it also provides the ethical ways of structured programming.
  • I think the best tutorial you will get for PHP, MySql and javascript is from w3schools. It is a very good source for learning programming languages and it also provides the ethical ways of structured programming.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories