leuthrick
Gebruiker
- Lid geworden
- 17 sep 2008
- Berichten
- 454
halo,
ik heb het volgende script:
het probleem is de title insert hij niet.
aan de tabel licht het niet.
ik kan de fout maar niet vinden
alvast bedankt
ik heb het volgende script:
PHP:
ERROR_REPORTING(E_ALL);
$self = $_SERVER['PHP_SELF'];
if($_SERVER['REQUEST_METHOD'] == "POST"){
$title_incert = $_POST['title'];
$link_incert = $_POST['link'];
$description_incert = $_POST['description'];
if ($description_incert == "" or $link_incert == "" or $title_incert = ""){
echo "you have nothing entered<br />";
}
else {
mysql_query("INSERT INTO news (title, link, description) VALUES ('$title_incert', '$link_incert', '$description_incert')") or die (exit("sql error"));
}
} else {
echo "use ";
highlight_string("<![CDATA[...]]>");
echo " to use html example:";
highlight_string("<![CDATA[<b>this is a test</b>]]>");
echo "<table border=\"1\">";
echo "<form action=\"$self\" method=\"post\"/>";
echo "<tr><td>title:</td><td>";
echo "<input type=\"text\" name=\"title\"/></td></tr>";
echo "<tr><td>link:</td><td>";
echo "<input type=\"text\" name=\"link\"/></td></tr>";
echo "<tr><td>description:</td><td>";
echo "<input type=\"text\" name=\"description\"/></td></tr><tr><td colspan=\"2\"><center>";
echo "<input type=\"submit\" name=\"submit\" value=\"update\"/></center></td></tr></table><br />";
}
$res = mysql_query("SELECT * FROM news");
if(mysql_num_rows($res) == 0){
echo "no rssfeeds";
}
het probleem is de title insert hij niet.
aan de tabel licht het niet.
ik kan de fout maar niet vinden

alvast bedankt