MySQL Forums
Forum List  »  PHP

how to use PHP variable in MYSQL query?
Posted by: vlado
Date: March 16, 2007 07:33PM

Hello,
I have this code:

$username = $_POST['username'];

...and I need to use this variable in a MySQL query like this:

$query = "SELECT * FROM users WHERE username = '________' ";

I used many options and it didn't work. Could you help me?

Options: ReplyQuote


Subject
Written By
Posted
how to use PHP variable in MYSQL query?
March 16, 2007 07:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.