I wrote some code as a start for a username and password registration page but i cant get the first bit to work. The page with the forms corresponding to the variables at the top work fine but when redirected to this page it just gives a blank white page.
I seem to get this error every time i write some code that is not just basic echo or something like that... Can someone tell me what is wrong with the code and is there any good php editor where you can see error messages or somethilng like that?
This is not the first time i get the same blank page error and i would love to know what i'm doing wrong.
<?php
$user = $_POST["username"];
$pass = $_POST["password"];
$conf_pass = $_POST["conf_password"];
$con = mysql_connect("localhost", "webuser1", "12345");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
if($pass != $conf_pass) {
echo ("passwords don't match, <a href="./reg_form.php">return</a>");
}
mysql_close($con);
?>
error_reportingcan be your friend.