Sorry about the stupid question however I can’t see/ not good enough to solve this:
I have a MYSQL db and a php form everything works but I can’t get out only one record – probably syntax error:
$SQL = "SELECT * FROM massfelh WHERE user = $uname AND pass = md5($pword)"; - this is working
$result = mysql_query($SQL); - this is too
$catg = $result['categ']; - help
$num_rows = mysql_num_rows($result); - this is ok too
echo $catg; - for test and I can't print it on screen
DB structure: id, user, pass, categ
I only need the categ (either 1 or 0) but it just won’t show on screen.
Any help would be appreciated – and please say I am stupid too:)
Update:
thank you for everyone of you!!!!!!! Helped me a lot. I have fount the best solution for my code however all the reply was correct. Thanks again hop this will help to some one how is just as beginner as me:) thank you again
Try This..