simzam Posted December 29, 2010 Share Posted December 29, 2010 my problem is when i click on hyperlink it start copying it self insertrow=yes in address bar how to tackle this $httpquery = "{$_SERVER['PHP_SELF']}?{$_SERVER['QUERY_STRING']}&insertrow=yes" ; <a href='{$httpquery}' >New</a> <br> if (isset($_GET['insertrow'])) { echo "<br> {$_GET['insertrow']} "; } Link to comment https://forums.phpfreaks.com/topic/222904-_server-url-path-help/ Share on other sites More sharing options...
simzam Posted December 29, 2010 Author Share Posted December 29, 2010 solved ! $httpquery = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']."insertrow=true" ; if ((isset($_GET['insertrow'])) &&($_GET['insertrow']=="true")){ list($httpquery) = explode('insertrow=true', $httpquery); $httpquery = $httpquery."insertrow=true" ; } Link to comment https://forums.phpfreaks.com/topic/222904-_server-url-path-help/#findComment-1152652 Share on other sites More sharing options...
simzam Posted December 30, 2010 Author Share Posted December 30, 2010 kindly tell if i want to explode multiple thing then how to do that this explode insertrow=true and i wanted explode this aswell &divid=div2 if ((isset($_GET['insertrow'])) &&($_GET['insertrow']=="true")){ list($httpquery) = explode('insertrow=true', $httpquery); $httpquery = $httpquery."insertrow=true" ; } Link to comment https://forums.phpfreaks.com/topic/222904-_server-url-path-help/#findComment-1152928 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.