Jump to content


Photo

PHARSE error


  • Please log in to reply
2 replies to this topic

#1 Freekstyle

Freekstyle
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationIn a clam.

Posted 01 August 2003 - 08:28 PM

i wrote

[php:1:0145684e14]<?php
mysql_select_db($database_Databasesite, $Databasesite);
$login = mysql_query(SELECT * FROM users WHERE username =\'$username\' AND password =\'password\');

?>[/php:1:0145684e14]

it says somethings wrong with it i have tried tons of times to fix it but it dont work. why?

Thanx in advance :wink: [/quote][/code]

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 01 August 2003 - 08:34 PM

add quotes (\") around your SELECT statement like so:

$login = mysql_query(\"SELECT * FROM users WHERE username =\'$username\' AND password =\'password\'\");

#3 Freekstyle

Freekstyle
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationIn a clam.

Posted 01 August 2003 - 08:39 PM

YES!!!

holy crap i cant belive i didn\'t even think about it. i overlooked a little mistake i always do along with the ending brackets. lol
THANK YOU




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users