Thnx man you saved me. Your code didnt realy work, it write "Unable to perform the SELECT query"
and a warning about a boolean in the line of the "while".
So i did a combination of you last code and the previous code and it looks like this:
<?php
$counter=1;
$sql = "SELECT id, first, last, mail, number FROM avi";
$result = @mysql_query($sql);
if (! $result) {
echo '<p> Unable to perform the SELECT query</p>';}
if(isset($_GET['action']) && $_GET['action'] == 'delete') {
$key = $_GET['delete_key'];
mysql_query("DELETE FROM avi WHERE id='$key'");
}
while ($row = mysql_fetch_array($result)) {
$key = $row['id'];
if ($counter%2==0){
echo '<tr class="light"><td>'.$row['first'].'</td><td>'. $row['last'].'</td><td class="email">'.$row['mail'].'</td><td>'. $row['number'].'</td><td name="edit">Edit</td>
<td>';?>
<a href="login_success.php?action=delete&delete_key=<?php echo $key; ?>"><img src="light.JPG" alt="Delete"></a></td></tr>
<?php
}
else{
echo' <tr class="papaya"><td>'.$row['first'].'</td><td>'. $row['last'].'</td><td class="email">'.$row['mail'].'</td><td>'. $row['number'].'</td><td name="edit">Edit</td>
<td>';?>
<a href="login_success.php?action=delete&delete_key=<?php echo $key; ?>"><img src="light.JPG" alt="Delete"></a></td></tr>
<?php
}
$counter++;
}
?>
It works great!!!!
So i left only with the question that you didnt understand so ill ask it differently.
On my index page the user types the user name and password. By using $_post in checklogin.php i validate that the username and password are good. From checklogin.php i automatically move to login_successs.php. But how i can tell in login_successs who is the user that i validated in checklogin.php
???