I believe that this is a really basic problem but i am starting my coding at PHP so i really can't do it all alone:
I've been for 2 days trying to solve a strange problem. I am using XAMPP for my database and its tables with the objective of creating a login and register system.
This is my user table:
CREATE TABLE `playware`.`users` (
`user_id` INT( 5 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 25 ) NOT NULL ,
`surname` VARCHAR( 25 ) NOT NULL ,
`email` VARCHAR( 35 ) NOT NULL ,
`telephone` VARCHAR( 9 ) NOT NULL ,
`password` VARCHAR( 50 ) NOT NULL ,
) ENGINE = MYISAM ;
The register .php file is working (it's adding the user to the table correctly) but when i try to make login i just can't.
So I've made this on my login.php file just to test if it gets the row:
$email = $_POST["email"];
$upass = $_POST["password"];
$sql="SELECT email FROM users";
echo"Writting email: ".$row["email"]." - done writting.";
All time i try to do this results on a white screen, nothing more, when it's supposed to appear the user email. Someone knows how to fix this?
The error was:
//Stuff here ...
It can't take the ";" there because it cancels the outputting. So the fix is:
As I expected, it was a basic error ... Thank you for people that supported me.