Find fejlen! FRUSTRERET
Find fejlen: (Jeg er connectet til MySQL, og når jeg går ind i phpmyadmin og laver indlæg virker den fint). Den kommer ikke op med nogen error, den tilføjer bare heller ikke noget.Index.php?id=7:
elseif ($id == 7) {
include("start.txt");
echo "<h3><div align='center'>" . ".Various Graphics." . "</div></h3>";
$foresp = mysql_query("SELECT * FROM graphics order by id");
while($row = mysql_fetch_array($foresp)) {
$imgurl = $row[imgurl];
$url = $row[url];
$beskrivelse = $row[beskrivelse];
?>
<a href="../img/<?php echo "$url"; ?>" target="_blank"><img src="../img/<?php echo "$imgurl"; ?>" border="0" alt="<?php echo "$beskrivelse"; ?>"></a>
<?php
}
?>
<h1>
<form action="gem.php?id=7" method="post"><br>
Lillebillede navn:<br><input type="text" name="lille" value="skuflille.png"><br>
Stortbillede navn:<br><input type="text" name="stor" value="skufstor.jpg"><br>
Beskrivelse:<br><input type="text" name="beskrivelse" value="En kommode lavet i 3dsmax 6"><br>
<input type="submit" value="Post indlæg">
<input type="reset" value="Slet felter">
</form>
</h1>
<?php
include("slut.txt");
}
gem.php?id=7
$imgurl = $_POST["lille"];
$url = $_POST["stor"];
$beskrivelse = $_POST["beskrivelse"];
mysql_query ("INSERT INTO graphics (id, imgurl, url, beskrivelse) VALUES ('','$imgurl','$url','$beskrivelse'')");
header("Location: index.php?id=7");
}
