Hi all PHPBuilders,
I'm trying to get information from my database. But the fields are only showing the first word?
In the database the field is "hello t-shirt", and the field is only showing "hello"...
$result = mysql_query("SELECT * FROM products WHERE id='".mysql_real_escape_string($_GET["id"])."'");
$row = mysql_fetch_array($result);
echo "<form action=\"gemprodukt.php\" method=\"post\">";
echo "<input type='hidden' name='id' value='".$_GET["id"]."' /><br /><br />";
echo "<b>ID: </b>".$_GET["id"]."<br /><br />";
echo "<input type=\"text\" size=\"80\" name=\"title\" value=".$row["title"]." /><br /><br />";
echo "<textarea name=\"body\" cols=\"80\" rows=\"10\" value=".$row["body"]."></textarea><br /><br />";
echo "<input type=\"text\" size=\"80\" name=\"price\" value=".$row["price"]." /><br /><br />";
echo "<input type=\"text\" size=\"80\" name=\"image\" value=".$row["image"]." /><br /><br /><br />";
echo "<input type=\"submit\" value=\"Update product\" /><br /><br /><br />";
echo "</form>";
It's really strange (for me)... Hope some of you guys could help me out :-)