millers Posted February 26, 2008 Report Posted February 26, 2008 (edited) kas tas pa error Parse error: syntax error, unexpected '=' in C:\AppServ\www\authenticate.php on line 4 un no ka vinjs izcelas rekur ir authenticate.php skripts ludzu palidzat ja varat izlabojat tas itka izcelas 3 linija wtf @mysql_connect("localhost", "root", "pass") or die("Cannot connect to DB!"); @mysql_select_db("accounts") or die("Cannot select DB!"); $sql="SELECT loginid FROM accounts WHERE loginid=’".$login.”’ and password=’”.$password.”’”; $r = mysql_query($sql); if(!$r) { $err=mysql_error(); print $err; exit(); } if(mysql_affected_rows()==0){ print "no such login in the system. please try again."; exit(); } else{ print "successfully logged into system."; } Edited February 26, 2008 by millers
Klez Posted February 26, 2008 Report Posted February 26, 2008 pameegini itaa varbuut? $sql="SELECT loginid FROM accounts WHERE loginid='$login' and password='$password'";
andrisp Posted February 26, 2008 Report Posted February 26, 2008 (edited) Tev tur kaut kādas šķības pēdiņas.. Edited February 26, 2008 by andrisp
mounkuls Posted February 26, 2008 Report Posted February 26, 2008 (edited) Vai tikai password nebija rezervets vards ? Ir doma ka mysql to password uztver kaa funkciju PASSWORD Edited February 26, 2008 by mounkuls
Vebers Posted February 26, 2008 Report Posted February 26, 2008 mounkulis, neuztver jo tā netiek izmantota kā funkcija, tjip password('asfasf'). A par autora problēmu andrisp ir taisnība tās pēdiņas tādas kroplīgas, vajag izmantot normālu teksta redaktoru , vai arī fonts ir pie vainas :)
kasisppr Posted February 27, 2008 Report Posted February 27, 2008 Skatos, ka sakot ar ”’ and password=’”.$password.”’”; tev panesās kaut kādas "kreisās" dubultpēdiņas.
zinatnieks Posted February 27, 2008 Report Posted February 27, 2008 Mēģini šādi: $sql="SELECT loginid FROM accounts WHERE loginid='{$login}' and password='{$password}';
andrisp Posted February 27, 2008 Report Posted February 27, 2008 Šitas ir posts, kur visi viens otru atkārto ? :)
Recommended Posts