Jump to content

whopunk123

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

whopunk123's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. if you feel that you dont want to help because the problem is so basic then leave the post because further down the line there you are with more of your critisim. every one starts somewhere remember, you also sometimes back you were like we so mr master whet you call basic might be what is causing trafic jam for another. the board is so big leave the basic question to those willing to help. Please delet the die() function. and also do you have data in the database? I will and I do have data in the database. Also sorry moderator for the trouble this is making.
  2. Ok thanks you two you have been of great help I have now lost that error but could you help with echoing out the data it gets from the mysql query. All it outputs is "whopunk123Resource id #3" I have tried a few things none of them worked I have changed my code so it now looks like this <?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()); $results = mysql_query($query); $data = $results['balance']; echo $data; die() ?> Thanks again for the help I had already
  3. More like this: $query = sprintf("SELECT `balance` FROM `cobblecr_minecraft` WHERE 'username = $search' LIMIT 0, 30 ", mysql_real_escape_string($search));
  4. Yes I am new to PHP so I'm still learning the ropes
  5. Should it look more like this? mysql_result( $query ['username']);
  6. 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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.