Hey guys, I managed to make a product page for my feed. When people clicked a product it would go to And on the product.php page it would be mySQL programmed to show This worked perfectly. But when I downloaded the php files and database and reuploaded it onto another site, it didn't work! Even though everything else did.. What could be the problem? I know this is a strange thing to happen but I have tried a lot of things and nothing seems to make it work again...
I am not familiair with php but I remember that it has something like a MAGIC_QUOTES setting which assumes it can escape special characters in your input without knowing what special characters are used in your output but fucking up your data anyway hence no output from your query. Seems they also changed the default in newer versions sometime they get smarter. It could be that this setting changed from your first to your second server.
Can you post the code where the $id variable is set? It should look like: $id = $_GET['id']; or something similar.
while ($row = mysql_fetch_array($result)) { $field1= $row["Link"]; $field2= $row["Price"]; $field3= $row["Thumbnail"]; $field4= $row["Category"]; $field5= $row["Name"]; $field6= $row["ProductID"]; echo "<a href=product.php?id=$field6>$field5</a><br>"; Code (markup): so when they click it would go to my product.php page which has this snippet of code in it: $query = "SELECT * FROM table WHERE ProductID='$id' $limit"; $result = mysql_query($query) or trigger_error("SQL", E_USER_ERROR); Code (markup):
What happens when you hard code $limit to 1 and what is the response when you perform the query directly in the Mysql database server ?