I've just started php and mysql.trying this code to check if mysql account is correct or not.
<?php
$usr=$_POST['username'];
$psw=$_POST['passwd'];
echo ' body tag, other things and a message: Logging in! '; echo $usr;
$connection = myqsl_connect('localhost',$usr,$psw);
if (!$connection){
die('<p>Stopped : ' . mysql_error());
echo '<br /><a href="index.html">Retry</a></p>';
}
else echo '<p>Logged on!<br /><a href="something.php">Continue</a></p>';
//planning to add mysql_close($connection) here
?>
page has nothing else but the endings of tags started in first "echo" and some <head></head> configuraiton. code is between </head> and </body> tags. (it includes the <body> tag in an "echo"). this writes no output from the if - else statement; but rest of the html and css is shown. post variables can be seen when I write them to page with echo. please help. thx.