PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$query = "SELECT password from ".$tablename." WHERE username = '".$_SESSION['username']."'";
All you are doing is building a query as a string in PHP.
When you echo that query, it is still PHP.
So basically, PHP is not doing its job by parsing the variables to build the query before you pass it to the mysql_db_query() function to query the database.
yeah, i understand that its PHP, its in the ?php tags obviously, im not that much of a newb
what im saying is that it cannot b a installation problem when it is perfectly capable of creating and retrieving server vars when i ask it to but not able to read the var inside a SQL query
does anyone have any idea a possible cause/fix to this problem?
<?
//Run this script AS IS and post the results on the forum
$test_variable = "Yes I printed";
echo $test_variable;
echo "<br>";
echo $test_variable." with this concat on the end";
echo "<br>";
echo "Concat begining ".$test_variable;
echo "<br>";
echo "Concat begining ".$test_variable." concat end";
?>