leatherback wrote:Please provide us with answers to:
- What is the query that you submit to the database
- What is the error mysql gives off
- What is the method you use to determine whether you update or insert
Leatherback - Thanks for your help.
As for the query, I am submitting through:
<form action="savereview.php" method="get">
The savereview.php runs a _REQUEST for all variables then passed to this :[code=php]// if $id is not defined, we have a new entry, otherwise update the old entry
if( $id )
{
$query = "UPDATE review SET category='$category', subcategory='$subcategory', title='$title', description='$description', manufacturer='$manufacturer', link1='$link1', link2='$link2', link3='$link3', retail='$retail', price='$price', image1='$image1', image2='$image2', image3='$image3',review='$review',ehreview='$ehreview', ebaywords='$ebaywords' WHERE id='$id'";
}
else
{
$query = "INSERT INTO review ( category,subcategory,title,description,manufacturer,link1,link2,link3,retail,price,image1,image2,image3,review,ehreview,ebaywords )
VALUES ( '$category','$subcategory','$title','$description','$manufacturer','$link1','$link2','$link3','$retail','$price','$image1','$image2','$image3','$review','$ehreview','$ebaywords' )";
}
// save the info to the database
$results = mysql_query( $query );
// print out the results
if( $results )
{
echo( "Entry has been successfully saved. <a href='reviewdetails.php'>Details Page</a><br /><br />" );
echo( "Entry has been successfully saved. <a href='index.php'>Administration</a><br><br>" );
}
else
{
die( "Trouble saving information to the database: " . mysql_error() );
}[/code]
As for an error, I don't get any error, its like the Submit button doesn't do anything when clicked.
Does this help at all?
I also changed the "longtext" to "text" in the DB and reduced some of the VARCHAR's to lower amounts, but that didn't affect anything.