Hello guys, Please take a look at my code, coz I don't know why I cant login here in my log in form.By the way, my database is working, so the problem is in the code. looking forward for your help guys,
why dont you try and combine your queries into 1 query i.e. ... Then execute query, check if record was found do something, else show error. Also remember to sanitize your user input as currently you are prone to sql injection - pg_escape_string
oh another note, move the PHP code above your html code, you dont want to render the HTML and then process your PHP and also you cant redirect if content is written to the page too. if that makes sense?
Have you encrypted your password in your data base when you save it? If yes, you should dechiper your password before if($password == $p_password ). Try using echo to show what you got in $p_password, before the condition.