473,669 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Php_Self

How can I retrieve all the page name with arguments passed to itself?

Using Php_Self tag with the following URL:

http://localhost/workplaceGSA/index...._total_count=7

returns:

http://localhost/workplaceGSA/index.php
I want http://localhost/workplaceGSA/index...._total_count=7 as is.
Any help will be highly appreciated.

--
-Ankur Gupta
Jul 17 '05 #1
3 6038
<?=$PHP_SELF."" .$QUERY_STRING; ?>
"Ankur Gupta" <ag****@nospam. org> wrote in message
news:bl******** **@solaria.cc.g atech.edu...
How can I retrieve all the page name with arguments passed to itself?

Using Php_Self tag with the following URL:

http://localhost/workplaceGSA/index...._total_count=7
returns:

http://localhost/workplaceGSA/index.php
I want http://localhost/workplaceGSA/index...._total_count=7
as is.

Any help will be highly appreciated.

--
-Ankur Gupta

Jul 17 '05 #2
$PHP_SELF is supposed to include the query string along with the URL.
You'll have to do a check to see what is truly going on, something like
this:

<?

$phpSelf = (preg_match('/\?/', $PHP_SELF) ? $PHP_SELF : $PHP_SELF .
$QUERY_STRING;

?>

Phil

"Ankur Gupta" <ag****@nospam. org> wrote in message
news:bl******** **@solaria.cc.g atech.edu...
How can I retrieve all the page name with arguments passed to itself?

Using Php_Self tag with the following URL:

http://localhost/workplaceGSA/index...._total_count=7
returns:

http://localhost/workplaceGSA/index.php
I want http://localhost/workplaceGSA/index...._total_count=7
as is.

Any help will be highly appreciated.

--
-Ankur Gupta

Jul 17 '05 #3
Oops made a parse error, here's the correction below..

Phil

"Phil Powell" <so*****@erols. com> wrote in message
news:Q79eb.2581 7$sp2.6743@lake read04...
$PHP_SELF is supposed to include the query string along with the URL.
You'll have to do a check to see what is truly going on, something like
this:

<?

$phpSelf = (preg_match('/\?/', $PHP_SELF)) ? $PHP_SELF : $PHP_SELF .
$QUERY_STRING;

?>

Phil

"Ankur Gupta" <ag****@nospam. org> wrote in message
news:bl******** **@solaria.cc.g atech.edu...
How can I retrieve all the page name with arguments passed to itself?

Using Php_Self tag with the following URL:

http://localhost/workplaceGSA/index...._total_count=7

returns:

http://localhost/workplaceGSA/index.php
I want

http://localhost/workplaceGSA/index...._total_count=7 as is.


Any help will be highly appreciated.

--
-Ankur Gupta


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6596
by: Gbona | last post by:
While running the following piece of code if (eregi("config.php",$PHP_SELF)) { Header("Location: index.php"); die(); } I get the following error Notice: Undefined variable: PHP_SELF in c:\nuke\config.php on line 92
3
2517
by: John Hanauer | last post by:
I'm getting my own SSL certificate soon because it is the right thing to do, but until then I have this shopping cart on an ISP that gives me free shared SSL. The cart breaks in HTTPS because of $PHP_SELF and the cart's tech support blames my ISP. I'm wondering if this is true. So, my site, let's call it mydomain.com would normally access at: http://mydomain.com/
3
5469
by: Joshua Beall | last post by:
Hi All, What is the difference between $_SERVER and $_SERVER, and which is better to use? According to the CGI 1.1 spec (http://hoohoo.ncsa.uiuc.edu/cgi/env.html), SCRIPT_NAME is not something specific to Apache (if I understand that correctly). But where does PHP_SELF come from? What creates that? According to http://php.net/reserved.variables, PHP has no control over the $_SERVER array. Quote:
5
2830
by: Maja | last post by:
here's situation: i have installed php 5 and apache 2.0. i can call my page with: localhost\\subdir\page.php inside my page i use links like this:
12
4454
by: Don | last post by:
What's the PHP equivalent for the following? if(window.location == "http:/site.com/page1.html") { } else { }
1
4190
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens in IE as well as FireFox. This code has been tested on a Win2003 server, IIS6, PHP 5.0.3, mySQL 4.1.8 and it works fine. The problem server is a Win2k server, IIS5, PHP 5.0.4, mySQL 4.1.11.
10
5241
by: Jim Carlock | last post by:
Looking for a way to extract the path from the pfqpn (partially full qualified path name). $sThisServer = $_SERVER; // returns either aquaticcreationsnc.com or www.aquaticcreationsnc.com $sThisServer = $_SERVER; // returns aquaticcreationsnc.com whether or not the end-user typed // in the preceding www.
4
5661
by: Jim Carlock | last post by:
Are the XSS / Cross Site Scripting attacks fixed in Version 4.44? I'm seeing that $_SERVER doesn't return the $_SERVER appended to it. I was just messing with a few things and noticed that PHP_SELF returns only the page name now and without the $_GET query... http://blog.phpdoc.info/archives/13-XSS-Woes.html
18
10738
by: zoilus | last post by:
Can not determine how "<?=PHP_SELF?>" is supposed to work. The below is the line of code. <!-- <form name="search" method="post" action="<?=$PHP_SELF?>"--> When the above statement is run the following is the result. You don't have permission to access /dev/forms/forms_testing/< on this server.
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.