conceting variables...
Posted: Sun May 28, 2006 4:22 pm
Ok,i promise this will be the alst time that i am going to ask a question liek this,but how do i use variable sin a sql statement or anywhere else.
Like for example,i have this code
i get :Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/noob/public_html/index.php on line 56
im not sure what it means but i think it is relevant to this piece of code.
Also,say in this SQL statement
Im pretty sure that i did something wrong with variables in both of them,could someone help me?
Like for example,i have this code
Code: Select all
while($result = mysql_fetch_array($query)) {
echo "Title:'.$result['title'].'";
<hr>
echo "Written By: '.$result['author'].'";
echo "Date: '.$result['date'].'";
echo "Time: '.$result['time'].'";
}im not sure what it means but i think it is relevant to this piece of code.
Also,say in this SQL statement
Code: Select all
$query = ("SELECT name,pass,email FROM users WHERE name='.$name.' AND pass='.$md5.'");