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. Link to comment https://forums.phpfreaks.com/topic/102549-solved-same-file-remote-and-local-different-results/ 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()); Link to comment https://forums.phpfreaks.com/topic/102549-solved-same-file-remote-and-local-different-results/#findComment-525087 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!! Link to comment https://forums.phpfreaks.com/topic/102549-solved-same-file-remote-and-local-different-results/#findComment-525107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.