phpzone Posted June 9, 2008 Share Posted June 9, 2008 I just wanted to check, is appending QUERY_STRING to create $more_link like this considered ok or do people recommending sanitizing the variable in some way first? <?php foreach( $el->entries as $key=>$entry ) { $more_link = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '&entry_id=' . $entry['entry_id']; print <<<_DISPLAY_ITEM <div class="blog-entry"> <p class="blog-title">{$entry['entry_title']}</p> <p class="blog-preface">{$entry['entry_preface']}</p> <p class="blog-more"><a href="{$more_link}">read more</a></p> </div> _DISPLAY_ITEM; ?> Link to comment https://forums.phpfreaks.com/topic/109422-appending-_serverquery_string-safe/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.