Forgive my ignorance this is a script in the admin section of a ptc website when it calls
http://www.maverickptc.info/admin.php?op=10 then nothing happens.well nothing happens when it callls all admin functions as in op=1 op=2 etc I think that is the code below but i am not a programmer
you can log into the site at
www.maverickptc.info login: admin password:123456 go to members section/then admin/then you will see when you try and change something nothing happens This is just a piece of the code as it is to long for here
{
$id=$_GET["id"];
$option=$_GET["option"];
if ($option=="edit"){
?>
<?
$tablae = mysql_query("SELECT * FROM tb_ads where id='$id'"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre
while ($registroe = mysql_fetch_array($tablae)) { // comienza un bucle que leera todos los registros y ejecutara las ordenes que siguen
?>
<form method="post" action="admin.php?op=2">
Id: <input type="hidden" name="id" value="<?= $registroe["id"] ?>"><?= $registroe["id"] ?><br>
Paypal name: <input type="text" name="pname" value="<?= $registroe["paypalname"] ?>"><br>
Paypal email: <input type="text" name="pemail" value="<?= $registroe["paypalemail"] ?>"><br>
Plan(number of visits): <input type="text" name="plan" value="<?= $registroe["plan"] ?>"><br>
URL: <input type="text" name="url" value="<?= $registroe["url"] ?>"><br>
Description: <input type="text" name="description" value="<?= $registroe["description"] ?>"><br>
Bold: <input type="text" name="bold" value="<?= $registroe["bold"] ?>"><br>
Highlight: <input type="text" name="highlight" value="<?= $registroe["highlight"] ?>"><br>
<br>
<input type="submit" value="Save">
</fotm>
<br><br>
<?
}
?>
<?
}
if ($option=="delete"){
//Todo parece correcto procedemos con la inserccion
$queryz = "DELETE FROM tb_ads WHERE id='$id'";
mysql_query($queryz) or die(mysql_error());
echo "<font color=\"#cc0000\"><b>Avertise has been deleted.</b></font><br><br>";
}
}
?>
<table>
<tr>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Id
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
URL
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Description
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Plan (number of visits)
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
</b></font></td>
</tr>
<?
$tabla = mysql_query("SELECT * FROM tb_ads where tipo='ads' ORDER BY id ASC"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre
while ($registro = mysql_fetch_array($tabla)) { // comienza un bucle que leera todos los registros y ejecutara las ordenes que siguen
echo "
<tr>
<td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
". $registro["id"] ."
</font></td>
<td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
". $registro["url"] ."
</font></td>
<td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
". $registro["description"] ."
</font></td>
<td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
". $registro["plan"] ."
</font></td>
<td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">";
?>
<form method="post" action="admin.php?op=2&id=<?= $registro["id"] ?>&option=edit">
<input type="submit" value="Edit">
</form>
</font>
</td>
<td bgcolor="#eeeeee">
<form method="post" action="admin.php?op=2&id=<?= $registro["id"] ?>&option=delete">
<input type="submit" value="Delete">
</form>
</td>
</tr>
<?
} // fin del bucle de ordenes
?>
</table>
<?
break;
case (3):
?>
<?
if (isset($_GET["id"]))
{
$option=$_GET["option"];
if ($option=="delete")
{
//Todo parece correcto procedemos con la inserccion
$queryz = "DELETE FROM tb_contact WHERE id='$id'";
mysql_query($queryz) or die(mysql_error());
echo "<font color=\"#cc0000\"><b>Message has been deleted.</b></font><br><br>";
}
}
?>
<b>Menssages</b>
<br><br>
<table>
<tr>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Id
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Name
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
E-mail
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Topic
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Subject
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Comments
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
Ip
</b></font></td>
<td bgcolor="#cccccc"><font size="2" face="verdana"><b>
</b></font></td>
</tr>
<?