Jump to content

$_server url path help


simzam

Recommended Posts

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

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" ;

}

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" ;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.