Jump to content

Retrieving Data From SQL


oliverj777

Recommended Posts

Hello,

 

Its been a while since I've done a bit of PHP - and I have literally forgotten everything.

 

Okay, so I have this variable that holds a 'players name':

$CurrentPlayer = $_POST["PHPcurrentPlayer"];

 

And all I want to do, it check against my SQL to find any matches that are the same to PHPcurrentPlayer in the row of "player". So basically, if(CurrentPlayer == SQL player), once it has found the row, I want it to pull a out a 'score' data from the player.

 

Hope that makes sense?

 

No?

 

I have a table in SQL called 'highscore' - which has fields of: player and score.

 

I want to check CurrentPlayer against the highscore[player] and retrieve [score] in a variable.

 

I really need help. Thanks

Link to comment
https://forums.phpfreaks.com/topic/239103-retrieving-data-from-sql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.