<style type="text/css">
table {
font-size:12px;}
</style>
<?php
//Verbindung
require_once ("connect/mysql_connect.php");
$poll = mysql_connect($hostname_poll, $username_poll, $password_poll) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db ("online_reg");
global $poll;
$sql = "SELECT * FROM `registration_extern_download` WHERE shop='Simmarket'";
$result = mysql_query($sql);
if ($action == 'reset')
{
$result = mysql_query("update online_reg set modify = now(), activation_key_1 = '', activation_key_2 = '',activation_key_3 = '' where id = '" . $id . "");
}
//Ausgabe
echo"<table border='1' style='font-size 5pt'>";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr>
<td>$row[id]</td>
<td>$row[customer_email]</td>
<td>$row[products_serial]</td>
<td>$row[activation_key_1] </td>
<td>$row[activation_key_2] </td>
<td>$row[activation_key_3] </td>
<td><form id='form1' name='form1' method='post' action=simmarket.php?action=reset&id=$row[id]><input type='submit' value='Zurucksetzen' name='submit' /></form></td>
</tr>";
}
echo"</table>";
?>
At the momment my reset dont work with that error
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /usr/www/users/aerosy/analysis/simmarket.php on line 27
Maybe anyone could help with that it should reset all activation keys with the id of it...