Czemu gdy przez formularz wysyłam dane wszystko działa a gdy próbuję przez przeglądarkę wpisując checklogin.php?myusername=john już nie
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <form name="form1" method="post" action="checklogin.php"> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <td width="78">Username
</td> <td width="294"><input name="myusername" type="text" id="myusername"></td> <td><input type="submit" name="Submit" value="Login"></td>
checklogin.php
<?php
$host="mysql.cba.pl"; // Host name
$username="gebit"; // Mysql username
$password="55845555"; // Mysql password
$db_name="donaukiphp_cba_pl"; // Database name
$tbl_name="yet"; // Table name
$zmienna1='<form action="index.php" method="post"
<tr>
<th>Wprowadź urzytkownika: </th>
<td><input name="fname" type="text" valu="" /></td>
</tr>
<input type="submit" name="Wyślij"></form>';
$zmienna2='<form action="index.php" method="post"
<tr>
<th>Wprowadź nazwę urzytkownika: </th>
<td><input name="fname" type="text" valu="" /></td>
</tr>
<input type="submit" name="Wyślij"></form>';
// Connect to server and select databse.
// Define $myusername and $mypassword
$myusername=$_POST['myusername'];
// To protect MySQL injection (more detail about MySQL injection)
$sql="SELECT * FROM $tbl_name WHERE username='$myusername'";
// Mysql_num_row is counting table row
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
}
else {
}
?>