bobinindia Posted April 23, 2008 Share Posted April 23, 2008 I have simple call to a database that is working localyy but not remotely.? <?php include('../../../externals/mysql_connect.php'); $thumb_id = $_GET['thumb_id']; $query = "DELETE FROM image_thumbs WHERE thumb_id = '$thumb_id' LIMIT 1"; $result = mysql_query($query); header('Location: myimages.php'); ?> called by a file that just read the contents of the database creating rows of images with links to delete themselves : $query = "SELECT thumb_id, upload_id, thumb_url FROM image_thumbs WHERE user_id = '$user_id' ORDER BY thumb_id LIMIT 5"; $result = mysql_query($query); if($result){ ?> <h3 align="center">Click on one of your images to put it on a coin.</h3> <table><tr><td> <?php while ($row = mysql_fetch_array($result)) { echo "<a href=\"choosecoin.php?upload_id="; echo $row['upload_id']; echo '"><img src="'; echo $row['thumb_url']; echo '"/></a>'; echo '<br />'; echo "<a href=\"deleteimage.php?thumb_id="; echo $row['thumb_id']; echo '">DELETE</>'; echo '</td><td>'; } ?> Can anyone give me a clue. Locally you click the link and you are back on the same page minus one thumb. Remote nothing. Viewing the source shows the links are correct. Quote Link to comment Share on other sites More sharing options...
Spaceman-Spiff Posted April 23, 2008 Share Posted April 23, 2008 You can check for error messages this way: $result = mysql_query($query) or die(mysql_error()); Quote Link to comment Share on other sites More sharing options...
bobinindia Posted April 23, 2008 Author Share Posted April 23, 2008 database user didn't have delete permission!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.