Jump to content

Help with Parse Error!


alex.dinca

Recommended Posts

<?php

require_once("db.php")

 

$user= $_POST['user'];

$password= $_POST['parola'];

$cerere="select user from cont where user='$user' and parola='$parola'";

$rezultat=mysql_query($cerere);

$rand=mysql_fetch_array($rezultat);

if ($rand['user'];

{echo "Numele si/sau parola sunt gresite";

}

 

esle "bla bla"; ;

?>

 

 

 

 

what is wrong at line 4, i am keep getting  Parse error :((

Link to comment
https://forums.phpfreaks.com/topic/189646-help-with-parse-error/
Share on other sites

<?php

require_once("db.php")

 

$user= $_POST['user'];

$password= $_POST['parola'];

$cerere="select user from cont where user='$user' and parola='$parola'";

$rezultat=mysql_query($cerere);

$rand=mysql_fetch_array($rezultat);

if ($rand['user'];

{echo "Numele si/sau parola sunt gresite";

}

 

esle "bla bla"; ;

?>

 

ok .. i have corrected require_once("db.php")    to require_once("db.php");

 

 

then it said error at line 13. deleted the part with else

 

then i got this

 

 

Notice: Undefined index: parola in C:\EasyPHP5.3.0\www\login2.php on line 5

 

Notice: Undefined variable: parola in C:\EasyPHP5.3.0\www\login2.php on line 6

Numele si/sau parola sunt gresite

 

<?php

require_once("db.php")

 

$user= $_POST['user']);

$password= $_POST['parola'];

$cerere="select user from cont where user='$user' and parola='$password'";

$rezultat=mysql_query($cerere);

$rand=mysql_fetch_array($rezultat);

if ($rand['user'])

{echo "Numele si/sau parola sunt gresite";

}

 

esle "bla bla";

?>

 

just a quick look over, but think thats all the errors

 

edit... made a typo typing to fast... fixed now

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.