MySQL interesse |
|
<?
if ($submit != "verzenden" || !$naam || !$link) {
$sql = "SELECT * FROM adm_menus WHERE id ='$menuid'";
$result = mysql_query($sql);
$menu = mysql_fetch_array($result);
echo "<table width=98% cellpadding=0 cellspacing=0 border=0>";
echo "<tr><td align=right><img src=layout/headers/optie_toevoegen.gif></td></tr>";
echo "<tr><td>";
echo "<form method=\"POST\" name=\"optie_toevoegen\" action=\"?p=menu/optie_toevoegen\">";
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"".$con['table1_color']."\" style=\"".$con['table1_border']."\">";
echo "<tr>";
echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Geselecteerd menu</td><td width=\"2%\">:</td><td><b><input type=\"text\" name=\"menu\" size=\"40\" value=\"".$menu['menu']."\" readonly></b></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Menu naam</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"naam\" size=\"40\" value=\"$naam\">";
if ($submit && !$naam) {
echo "<font color=yellow> Invullen!</font>";
}
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Menu link</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"link\" size=\"40\" value=\"$link\">";
if ($submit && !$link) {
echo "<font color=yellow> Invullen!</font>";
}
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"40%\"></td><td width=\"2%\"></td><td><input type=\"hidden\" name=\"menuid\" size=\"40\" value=\"".$menu['id']."\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=\"3\" height=\"5\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=\"2\" align=\"center\"></td><td><input type=\"reset\" name=\"reset\" value=\"Reset\"> <input type=\"submit\" name=\"submit\" value=\"Toevoegen\"></td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan=\"3\" height=\"5\"></td>";
echo "</tr>";
echo "</form>";
echo "</table>";
echo "</td></tr></table>";
} else {
$sql = "INSERT INTO adm_opties (naam, link, menuid) VALUES (".$_POST['naam'].", ".$_POST['link'].", ".$_POST['menuid'].")";
$result = mysql_query($sql) or die (mysql_error());
echo "Succesvol toegevoegd";
}
?>
<? if ($submit != "verzenden" || !$naam || !$link) { $sql = "SELECT * FROM adm_menus WHERE id ='$menuid'"; echo "<table width=98% cellpadding=0 cellspacing=0 border=0>"; echo "<tr><td align=right><img src=layout/headers/optie_toevoegen.gif></td></tr>"; echo "<form method=\"POST\" name=\"optie_toevoegen\" action=\"?p=menu/optie_toevoegen\">"; echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"".$con['table1_color']."\" style=\"".$con['table1_border']."\">"; echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Geselecteerd menu</td><td width=\"2%\">:</td><td><b><input type=\"text\" name=\"menu\" size=\"40\" value=\"".$menu['menu']."\" readonly></b></td>"; echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Menu naam</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"naam\" size=\"40\" value=\"$naam\">"; if ($submit && !$naam) { echo "<font color=yellow> Invullen!</font>"; } echo "<td width=\"40%\"> <img src=../layout/images/arrow.gif> Menu link</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"link\" size=\"40\" value=\"$link\">"; if ($submit && !$link) { echo "<font color=yellow> Invullen!</font>"; } echo "<td width=\"40%\"></td><td width=\"2%\"></td><td><input type=\"hidden\" name=\"menuid\" size=\"40\" value=\"".$menu['id']."\"></td>"; echo "<td colspan=\"3\" height=\"5\"></td>"; echo "<td colspan=\"2\" align=\"center\"></td><td><input type=\"reset\" name=\"reset\" value=\"Reset\"> <input type=\"submit\" name=\"submit\" value=\"Toevoegen\"></td>"; echo "<td colspan=\"3\" height=\"5\"></td>"; echo "</td></tr></table>"; } else { $sql = "INSERT INTO adm_opties (naam, link, menuid) VALUES (".$_POST['naam'].", ".$_POST['link'].", ".$_POST['menuid'].")"; echo "Succesvol toegevoegd"; } ?>
controle gaat allemaal goed.. maar dan moet hij verzenden.... dan gebuert er niks!... ik kan de fout niet vinden, zelfs met mij boekie niet!..
iemand?
|