petenaylor Posted March 14, 2011 Share Posted March 14, 2011 Hi all I have a page which has the following link on it: <a href="view-listings.php?live&id=<?php echo $showlistings['id'] ?>" title="Click here to make this listing live"><img src="../images/not-live.gif" width="20" title="Click here to make this listing live" alt="Click here to make this listing live" /></a> Which runs this part of the script: if (isset($_GET['live'])) { $liveid = $_GET['id']; mysql_query("UPDATE `listings` SET live = 1 WHERE id = '".$liveid."'"); header ("Location: view-listings.php"); } Which works great on Safari but it says "Page cannot be displayed" on a PC running Internet Explorer 8? Please help! Pete Link to comment https://forums.phpfreaks.com/topic/230597-link-not-working-in-ie/ Share on other sites More sharing options...
mikecampbell Posted March 14, 2011 Share Posted March 14, 2011 The query string should be like ?name1=value1&name2=value2 etc. so try this: href="view-listings.php?live=1&id=<?php echo $showlistings['id']; ?>" Link to comment https://forums.phpfreaks.com/topic/230597-link-not-working-in-ie/#findComment-1187433 Share on other sites More sharing options...
Adam Posted March 14, 2011 Share Posted March 14, 2011 The query string should be like ?name1=value1&name2=value2 etc. so try this: href="view-listings.php?live=1&id=<?php echo $showlistings['id']; ?>" Who says that? Even if it were technically incorrect, I very much doubt that would trip up a web browser. If you remove the header() call, does the error still show? Link to comment https://forums.phpfreaks.com/topic/230597-link-not-working-in-ie/#findComment-1187436 Share on other sites More sharing options...
frost Posted March 14, 2011 Share Posted March 14, 2011 I ran into a similar problem recently. "view-listings.php?live&id" is the issue, you need to give live a value of some kind. "view-listings.php?live=1&id" would work. Link to comment https://forums.phpfreaks.com/topic/230597-link-not-working-in-ie/#findComment-1187463 Share on other sites More sharing options...
petenaylor Posted March 14, 2011 Author Share Posted March 14, 2011 Fixed! All I needed to do was remove the header call and it worked! Cheers Mr Adam! Link to comment https://forums.phpfreaks.com/topic/230597-link-not-working-in-ie/#findComment-1187471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.