login  Naam:   Wachtwoord: 
Registreer je!
 Forum

problemen met form

Offline Ronstert - 30/12/2005 22:45 (laatste wijziging 30/12/2005 22:46)
Avatar van RonstertMySQL interesse
  1. <?
  2.  
  3. if ($submit != "verzenden" || !$naam || !$link) {
  4.  
  5. $sql = "SELECT * FROM adm_menus WHERE id ='$menuid'";
  6. $result = mysql_query($sql);
  7. $menu = mysql_fetch_array($result);
  8.  
  9. echo "<table width=98% cellpadding=0 cellspacing=0 border=0>";
  10. echo "<tr><td align=right><img src=layout/headers/optie_toevoegen.gif></td></tr>";
  11. echo "<tr><td>";
  12. echo "<form method=\"POST\" name=\"optie_toevoegen\" action=\"?p=menu/optie_toevoegen\">";
  13. echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"".$con['table1_color']."\" style=\"".$con['table1_border']."\">";
  14. echo "<tr>";
  15. echo "<td width=\"40%\">&nbsp;<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>";
  16. echo "</tr>";
  17. echo "<tr>";
  18. echo "<td width=\"40%\">&nbsp;<img src=../layout/images/arrow.gif> Menu naam</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"naam\" size=\"40\" value=\"$naam\">";
  19. if ($submit && !$naam) {
  20. echo "<font color=yellow> Invullen!</font>";
  21. }
  22. echo "</td>";
  23. echo "</tr>";
  24. echo "<tr>";
  25. echo "<td width=\"40%\">&nbsp;<img src=../layout/images/arrow.gif> Menu link</td><td width=\"2%\">:</td><td><input type=\"text\" name=\"link\" size=\"40\" value=\"$link\">";
  26. if ($submit && !$link) {
  27. echo "<font color=yellow> Invullen!</font>";
  28. }
  29. echo "</td>";
  30. echo "</tr>";
  31. echo "<tr>";
  32. echo "<td width=\"40%\"></td><td width=\"2%\"></td><td><input type=\"hidden\" name=\"menuid\" size=\"40\" value=\"".$menu['id']."\"></td>";
  33. echo "</tr>";
  34. echo "<tr>";
  35. echo "<td colspan=\"3\" height=\"5\"></td>";
  36. echo "</tr>";
  37. echo "<tr>";
  38. echo "<td colspan=\"2\" align=\"center\"></td><td><input type=\"reset\" name=\"reset\" value=\"Reset\"> <input type=\"submit\" name=\"submit\" value=\"Toevoegen\"></td>";
  39. echo "</tr>";
  40. echo "<tr>";
  41. echo "<td colspan=\"3\" height=\"5\"></td>";
  42. echo "</tr>";
  43. echo "</form>";
  44. echo "</table>";
  45.  
  46. echo "</td></tr></table>";
  47.  
  48. } else {
  49. $sql = "INSERT INTO adm_opties (naam, link, menuid) VALUES (".$_POST['naam'].", ".$_POST['link'].", ".$_POST['menuid'].")";
  50. $result = mysql_query($sql) or die (mysql_error());
  51. echo "Succesvol toegevoegd";
  52. }
  53. ?>


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?

0 antwoorden

Gesponsorde links
Er zijn nog geen reacties op dit bericht.
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2025 Sitemasters.be - Regels - Laadtijd: 0.187s