לא עוזר כלום תיראו תקוד של הhtml ותקוד של הphp
PHP קוד:
<?
if (!isset($_POST['mylogin']))
{}
else
{
$username = htmlspecialchars( $_POST['username'] ) ;
$password = htmlspecialchars( $_POST['password'] ) ;
if (!empty($_POST['username']))
{}
else
{$usernameeror = '*חובה להכניס שם משתמש<br />';}
if (!empty($_POST['password']))
{}
else
{$passworderor = '*חובה להכניס סיסמה<br />';}
if (!empty($_POST['username']) && !empty($_POST['password']))
{}
else
{echo '<u>השגיעות הבאות התרכשו</u><br />' . $usernameeror . '' . $passworderor . '';}
}
?>
HTML קוד:
<tr>
<td>
<table cellspacing="0" align="right">
<tr>
<td align="center" width="260" height="21" align="left" bgcolor="#FFFFFF" style="background-image: url(images/bar.gif); background-repeat: no-repeat;">
<font color="#FFFFFF" face="arial" style="font-size:13pt;">התחברות</font>
</td>
</tr>
<tr>
<td width="250" height="113" bgcolor="#D3D3D3">
<table>
<tr>
<td>
<form name="myform" action="index.php" method="POST">
<font color="#000000" face="arial" style="font-size:12pt;">
שם משתמש:
</font>
</td>
<td>
<input type="text" name="username">
</td>
</tr>
<tr>
<td>
<font color="#000000" face="arial" style="font-size:12pt;">
סיסמה:
</font>
</td>
<td>
<input type="text" name="password">
</td>
</tr>
</table>
<center><input type="image" name="mylogin" src="images/conect.gif"></center>
</form>
</td>
</tr>