Hello Ross,
Thursday, July 14, 2005, 11:11:25 AM, you wrote:
R Just a quick thing that is bugging me. In some of my older
R textbooks a form is returned to the same page by using
R echo $PHP_SELF no just $PHP_SELF
R is this just used in older versions of php?? Does the it make a
R difference
* Richard Davey [EMAIL PROTECTED]:
Hello Ross,
Thursday, July 14, 2005, 11:11:25 AM, you wrote:
R Just a quick thing that is bugging me. In some of my older
R textbooks a form is returned to the same page by using
R echo $PHP_SELF no just $PHP_SELF
R is this just used in older versions
Jordi Canals wrote:
I'd like to know the difference by using the $_SERVER['PHP_SELF'] and
$_SERVER['SCRIPT_NAME'] variables. After I read the manual, I have not
found the difference betwen the two when used in a Web Script. Also,
in all tests I've done, I get the same result in both variables.
* Thus wrote John Holmes:
Jordi Canals wrote:
I'd like to know the difference by using the $_SERVER['PHP_SELF'] and
$_SERVER['SCRIPT_NAME'] variables. After I read the manual, I have not
found the difference betwen the two when used in a Web Script. Also,
in all tests I've done, I get the
http://au2.php.net/manual/en/function.basename.php
Martin
-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]
Sent: Thursday, 5 February 2004 11:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] $PHP_SELF AND INFORMATION.
$_SERVER[PHP_SELF]; returns
Philip J. Newman wrote:
$_SERVER[PHP_SELF]; returns /c/hosting/newman/hello.php
is there an easy way to get get hello.php?
Didn't we just have this question today?
http://www.php.net/manual/en/function.basename.php
--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General
On Mon, Oct 20, 2003 at 01:23:29PM +0200, Boris Sagadin wrote:
:
: I'm having problems with $PHP_SELF variable. Mostly it works, other
: times (about 10% of tries) it's just empty. Is this a known issue with
: Apache 2? If I use $_SERVER['PHP_SELF'], it always works fine, but
: still I'd like to
$PHP_SELF is a variable that is a variable that has limited scope and as a rule of
thumb should never be used. It is a very sloppy way to code. I advise you stick to
$_SERVER['PHP_SELF'].
- Original Message -
From: Boris Sagadin
To: [EMAIL PROTECTED]
Sent: Monday, October 20,
On Wednesday, October 15, 2003, at 01:12 AM,
[EMAIL PROTECTED] wrote:
I'm using $PHP_SELF, but need to automatically record what variables
are
in the URL at that time...
is that possible?
try to get in the habbit of using $_SERVER['PHP_SELF'] on PHP = 4.1,
because $PHP_SELF is deprecated.
Try $HTTP_SERVER_VARS['PHP_SELF']
I'm not yours, so why should I be sincere about it,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.
- Original Message -
From: Johnny Martinez [EMAIL PROTECTED]
To: php list [EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 4:36 PM
you should also try with dirname(__FILE__) for getting the real path
j0rd1
On Thursday 05 June 2003 16:51, Stephen wrote:
Try $HTTP_SERVER_VARS['PHP_SELF']
I'm not yours, so why should I be sincere about it,
Stephen Craton
Senior Executive Web Developer
Mophus.com, Inc.
- Original
Thanks Chris for your thoughts, but no success yet.
Details interspersed below
Chris Hayes wrote:
...and the problem that the form immediately goes to the real url is that
people see the real url?
No, the problem is that the URLs don't match. The browser does accurately find
the page, etc.,
...and the problem that the form immediately goes to the real url is that
people see the real url?
What about one of the following:
- chop off the subdir again by only putting the last part of $PHP_SELF as
form action (f.i. with a combination of substr($PHP_SELF,...,...) and
strpos('/') )
What you might try is removing the single-quotes from around PHP_SELF.
Before: $_SERVER['PHP_SELF']
After: $_SERVER[PHP_SELF]
Another note: as far as I can tell you do not need the braces ({}) to
enclose a variable within a double-quoted string. I may be wrong, but
nothing I've read advocates
What you might try is removing the single-quotes from around PHP_SELF.
Before: $_SERVER['PHP_SELF']
After: $_SERVER[PHP_SELF]
Another note: as far as I can tell you do not need the braces ({}) to
enclose a variable within a double-quoted string. I may be wrong, but
nothing I've read
At 01:42 24.02.2003, Jason Lange spoke out and said:
[snip]
What you might try is removing the single-quotes from around PHP_SELF.
Before: $_SERVER['PHP_SELF']
After: $_SERVER[PHP_SELF]
This is only valid if the array is contained within a double quoted
on 24/02/03 11:42 AM, Jason Lange ([EMAIL PROTECTED]) wrote:
What you might try is removing the single-quotes from around PHP_SELF.
Before: $_SERVER['PHP_SELF']
After: $_SERVER[PHP_SELF]
Another note: as far as I can tell you do not need the braces ({}) to
enclose a variable within a
At 00:55 24.02.2003, Peter Gumbrell said:
[snip]
Could someone tell me why this code prompts a parse error. I have tried it
several different way. The statement is called from within a function:
print form method=\POST\ name=\update_workshop\
On Sun, 23 Feb 2003 18:55:06 -0500, you wrote:
Could someone tell me why this code prompts a parse error. I have tried it
several different way. The statement is called from within a function:
print form method=\POST\ name=\update_workshop\
action=\$_SERVER['PHP_SELF']\\n;
echo ('form
Not quite sure what you mean, but I'm guessing you're trying to use
$PHP_SELF and it's not set. If that's the case, use
$_SERVER['PHP_SELF'] instead. Register_globals defaults to disabled now.
[EMAIL PROTECTED] wrote:
Hello List,
anybody knows how to set the PHP_SELF variable?
Short
Hello Leif, hello all,
after successfully compiling and installing php.4.3-dev from tarball
there in my info.php the variable
Variable Value
PHP_SELF
PHP_SELF has no value. How can I set this?
Oliver Etzel
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
after successfully compiling and installing php.4.3-dev from tarball
...
PHP_SELF has no value. How can I set this?
Try using $_SERVER['PHP_SELF'] if it works look at the release notes and look
for register_globals
johannes
--
PHP
Hello Johannes, hello all,
I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF'] has no value either.
What can I do on order to give PHP_SELF the right value?
Oliver Etzel
On Tuesday 10 December 2002 12:36, info AT t-host.com wrote:
after successfully compiling and installing
Odd. Mind doing: print_r($GLOBALS); and tsending the results?
[EMAIL PROTECTED] wrote:
Hello Johannes, hello all,
I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF'] has no value either.
What can I do on order to give PHP_SELF the right value?
Oliver Etzel
On Tuesday 10
, December 10, 2002 1:03 PM
Subject: Re: [PHP] PHP_SELF Variable
Odd. Mind doing: print_r($GLOBALS); and tsending the results?
[EMAIL PROTECTED] wrote:
Hello Johannes, hello all,
I compiled it as CGI-php
and the variable $_SERVER['PHP_SELF'] has no value either.
What can I do
it as a CGI?
Oliver Etzel
- Original Message -
From: Leif K-Brooks
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, December 10, 2002 1:03 PM
Subject: Re: [PHP] PHP_SELF Variable
Odd. Mind doing: print_r($GLOBALS); and tsending the results?
[EMAIL PROTECTED] wrote
Hello Leif, hello all,
register_globals is on
How can I use the superglobal array?
And here is how my php behave:
when I run the following script: info70.php
?php
print_r($GLOBALS);
?
1) from commandline
then [SCRIPT_NAME] = info70.php
is set correctly
2) direkt via http request from browser
On Sunday 21 April 2002 00:51, Ben Edwards wrote:
The variable $PHP_SELF seems to be blank, I am using PHP 4.1.2 and Xitami
2.4d9 which are both the latest version. Has anyone else had this problem
and do they know how to fix it?
use:
print_r($GLOBALS)
to verify.
--
Jason Wong -
Spend a bit of time reading up on predefined variables (like $PHP_SELF) in
the manual:
http://www.php.net/manual/fi/reserved.variables.php
I believe you're after SCRIPT_NAME, but it's worth familiarising yourself
with them all for future reference.
Justin French
Creative
Try ?php if this works, then most likely you have php short tags
disabled. To enable ? Short tags check your php.ini file.
-Original Message-
From: Kirk Babb [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 6:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $PHP_SELF
SysInfo:
Hello:
try it with __FILE__
you might have to work a little on the resulting string, but it at least
delivers the current file's name
What is __FILE__, a global var, an environment variable? Could you put a
simple example?
Regards and thanks for your quick answer.
--
PHP General Mailing
On Wednesday 20 March 2002 10:12, José León Serna wrote:
Hello:
try it with __FILE__
you might have to work a little on the resulting string, but it at least
delivers the current file's name
What is __FILE__, a global var, an environment variable? Could you put a
simple example?
Hello:
echo __FILE__;
will show the current file name
Oops! Thanks! ;-))
Regards.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2002-03-12 at 15:02, David Johansen wrote:
Is there a way that I can use $PHP_SELF in include files, so that the
function will use the URL of the php script that calls the include file?
Thanks,
Dave
If a.php includes b.php, and you check $PHP_SELF in b.php, it should
give you the
I'm doing exactly what you said and here's what it says when I call
$PHP_SELF in the include file:
http://12.254.227.149/brbWarning/b:%20%20Undefined%20variable:%20%20PH
P_SELF%20in%20bc:/inetpub/wwwroot/pages.inc/b%20on%20line%20b35/bbr
?page=questions
Lars Torben Wilson [EMAIL PROTECTED]
Here's the chunk of code in the include file that gave me that. I should
have put it with the original post:
?php
function questions()
{
?
font face=Times New Roman size=5 color=#003399U/font/bfont
face=Times New Roman size=2
/fontfont face=Times New Roman size=4b
a href=?php echo
On Tue, 2002-03-12 at 15:13, David Johansen wrote:
I'm doing exactly what you said and here's what it says when I call
$PHP_SELF in the include file:
http://12.254.227.149/brbWarning/b:%20%20Undefined%20variable:%20%20PH
P_SELF%20in%20bc:/inetpub/wwwroot/pages.inc/b%20on%20line%20b35/bbr
?php
function questions()
{
[snip]
a href=?php echo $PHP_SELF??page=questionsfont
[snip]
}
?
$PHP_SELF is unknown to the function questions().
You'll need to add global $PHP_SELF at the top of the function.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work
On Tue, 12 Mar 2002, David Johansen wrote:
you might try
global $PHP_SELF;
in that function...
Here's the chunk of code in the include file that gave me that. I should
have put it with the original post:
?php
function questions()
{
?
font face=Times New Roman size=5
On Tue, 2002-03-12 at 15:17, David Johansen wrote:
Here's the chunk of code in the include file that gave me that. I should
have put it with the original post:
Ach. Well, $PHP_SELF is in the global scope, so you will either need to
use 'global $PHP_SELF;' at the beginning of your function, or
On Tue, 19 Feb 2002 09:50, Narvaez, Teresa did align ASCII characters thusly:
When I execute the code below, why is PHP_SELF undefined? I will appretiate
any help on this. I can get its value by:
echo $_SERVER[PHP_SELF];Thanks in advance! -Teresa
HTML
HEAD
TITLEFeedback/TITLE
-Original Message-
From: Matt [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2002 23:30
To: Lars Torben Wilson
$foo = This page is $_SERVER[PHP_SELF];
Or, better:
$foo = This page is {$_SERVER['PHP_SELF']};
You do have to concat to do this in single-quoted
On Tue, 2002-02-19 at 05:14, Ford, Mike [LSS] wrote:
-Original Message-
From: Matt [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2002 23:30
To: Lars Torben Wilson
$foo = This page is $_SERVER[PHP_SELF];
[snip]
Can you expand on why the first option isn't generally
On Monday, February 18, 2002, at 05:50 PM, Narvaez, Teresa wrote:
When I execute the code below, why is PHP_SELF undefined? I will
appretiate
any help on this. I can get its value by:
echo $_SERVER[PHP_SELF];Thanks in advance! -Teresa
HTML
HEAD
TITLEFeedback/TITLE
/HEAD
On Mon, 2002-02-18 at 15:02, Erik Price wrote:
On Monday, February 18, 2002, at 05:50 PM, Narvaez, Teresa wrote:
When I execute the code below, why is PHP_SELF undefined? I will
appretiate
any help on this. I can get its value by:
echo $_SERVER[PHP_SELF];Thanks in advance!
$foo = This page is $_SERVER[PHP_SELF];
Or, better:
$foo = This page is {$_SERVER['PHP_SELF']};
You do have to concat to do this in single-quoted (noninterpolated)
strings, though.
http://www.php.net/manual/en/language.types.string.php#language.types.string
.parsing
Can you expand
On Mon, 2002-02-18 at 15:29, Matt wrote:
$foo = This page is $_SERVER[PHP_SELF];
Or, better:
$foo = This page is {$_SERVER['PHP_SELF']};
You do have to concat to do this in single-quoted (noninterpolated)
strings, though.
On Monday, February 18, 2002, at 06:14 PM, Lars Torben Wilson wrote:
Sorry, but I do have to correct you here--this isn't true. ;) In double-
quoted strings and heredocs, you can do the following:
$foo = This page is $_SERVER[PHP_SELF];
Or, better:
$foo = This page is
The other reason is that the parser needs help resolving ambiguity with
more complex expressions inside strings. If you use this syntax all the
time, you won't get bitten in the butt later.
I've used the ${$var} to resolve the ambiguity of variable variables, but I
wasn't aware that if could
When I execute the code below, why is PHP_SELF undefined? I will
appretiate
any help on this. I can get its value by:
echo $_SERVER[PHP_SELF];Thanks in advance! -Teresa
Is your PHP install = version 4.1.0 ?
You can test with a call to phpinfo();
If your version is less than 4.1.0,
PROTECTED]
Subject: Re: [PHP] PHP_SELF Undefined
When I execute the code below, why is PHP_SELF undefined? I will
appretiate
any help on this. I can get its value by:
echo $_SERVER[PHP_SELF];Thanks in advance! -Teresa
Is your PHP install = version 4.1.0 ?
You can test with a call
Is the code below in a function? If so, you'll have to globalize $PHP_SELF:
function your_function() {
global $PHP_SELF;
...
echo $PHP_SELF;
..
}
alternatively, you could do
function your_function() {
On Tue, 4 Sep 2001 08:58, Ardani Sarjito wrote:
hi!
I have tried to undersatand the usage of PHP_SELF but I still don't get
it. Could anybody please explain it in simple palin English to this
poor slow guy who has just learn PHP?
Thank you so much for reviewing this email.
I'm just
Thanks for your quick reply.
my next question is: how does it work when I use PHP_SELF to send a value of
a variable to the same page?
Thanks!
Ardani
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
my next question is: how does it work when I use PHP_SELF to
send a value of a variable to the same page?
You use it to point your FORM there.
FORM ACTION='?echo $PHP_SELF?'
INPUT TYPE=HIDDEN NAME='name' VALUE='?echo $value?'
INPUT TYPE=SUBMIT VALUE='Go'
/FORM
Now, if the file this form is
Hi again!
Thank you for those who have reply my email.
Actually I'm trying to make a hangman game for my students.
I have seen one game written using PHP_SELF but I can't understand who it
works.
So, with the PHP_self (in my hangman game) I probably can send the value of
my variable to the
On Mon, 3 Sep 2001 17:15:25 -0700, you wrote:
So, with the PHP_self (in my hangman game) I probably can send the value of
my variable to the same page. now my next question is:
How do i maintain the content of the page which is build based on the value
passed from the previous submision? Do I
Thanks Jack
arcad.
Jack Dempsey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
you have to use $GLOBALS[SCRIPT_FILENAME]
jack
Arcadius A. wrote:
Hello !
Why this script prints an empty string(it prints nothing) as the
value of
the variable u
So sprach »Arcadius A.« am 2001-08-31 um 05:27:04 -0700 :
$u = $SCRIPT_FILENAME;
Because you did not define $SCRIPT_FILENAME anywhere. If you want to
access the global variable, you've got to say so:
global $SCRIPT_FILENAME;
Alexander Skwar
--
How to quote: http://learn.to/quote (german)
So sprach »Arcadius A.« am 2001-08-31 um 05:27:04 -0700 :
$u = $SCRIPT_FILENAME;
Because you did not define $SCRIPT_FILENAME anywhere. If you want to
access the global variable, you've got to say so:
global $SCRIPT_FILENAME;
Or, so you don't have to specify all the variables you are
So sprach »Boget, Chris« am 2001-08-31 um 10:04:49 -0500 :
Or, so you don't have to specify all the variables you are using
as globals (especially if you are using *alot* of them), you can
use:
$GLOBALS[SCRIPT_FILENAME];
What's the gain? 'global ' has 7 characters, whereas '$GLOBALS[]'
Or, so you don't have to specify all the variables you are using
as globals (especially if you are using *alot* of them), you can
use:
$GLOBALS[SCRIPT_FILENAME];
What's the gain? 'global ' has 7 characters, whereas '$GLOBALS[]' has
10 characters. So, you don't type less. And with
RE: [PHP] PHP_SELF or REQUEST_URI within Function ?Ok Men !!!. Now I see
thanks alot for the inputs ! :o))
Arcad
- Original Message -
From: Boget, Chris
To: 'Alexander Skwar'
Cc: Arcadius A. ; [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 8:22 AM
Subject: RE
So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500 :
True. But take the following function:
function processLotsOfFormVars() {
global $fieldOne, $fieldTwo, $fieldThree, $fieldFour;
global $fieldFive, $fieldSix, $fieldSeven;
global $PHP_SELF, $REQUEST_URI;
global
One of the downside of PHP IMHO is, that you do not have to define
variables. This leads to a lot of errors. At least there should be a
option, which forces you to define variables, like maybe so:
dim $some_var;
I definitely agree there. I've been bitten by this bug more times
than
Message -
From: Alexander Skwar [EMAIL PROTECTED]
To: Boget, Chris [EMAIL PROTECTED]
Cc: Arcadius A. [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 31, 2001 8:21 AM
Subject: Re: [PHP] PHP_SELF or REQUEST_URI within Function ?
So sprach »Boget, Chris« am 2001-08-31 um 10:22:28 -0500
Cool ...
Now that we're talking about PHP
I'd like to ask a question
You know the overloading function in C++ Is that
possible in PHP ?
No, I do not believe so.
Basically , I'd like to define more than one function having
the same name but different number of
One of the downside of PHP IMHO is, that you do not have to define
variables. This leads to a lot of errors. At least there should be a
option, which forces you to define variables, like maybe so:
I've not followed this thread but this is pretty much what E_NOTICE is
for, turn it on in
Ok .I see Thanks to you both !
Have a nice weekend
Arcad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
So sprach »Arcadius A.« am 2001-08-31 um 17:36:51 -0700 :
Would this work ?
Kinda, but not really.
If you want to do this, you've got to stuff it all in one function, like
so:
function dunno($mandatory, $optional1 = NULL, $opt2 = NULL){
if (NULL === $optional1){
//
you have to use $GLOBALS[SCRIPT_FILENAME]
jack
Arcadius A. wrote:
Hello !
Why this script prints an empty string(it prints nothing) as the value of
the variable u ?
This happens even if $REQUEST_URI or PHP_SELF is used instead of
SCRIPT_FILENAME .
Thanks...
?
function menu(
?
function menu( $theurl)
{
//global $u ;
$u = $SCRIPT_FILENAME;
echo $u;
echo $theurl;
}
?
Hello there !!!
? menu(hoho.com) ?
Variable scope.
You need a global $SCRIPT_FILENAME; at the top of the function.
Jason
--
PHP General Mailing List (http://www.php.net/)
To
Michael,
I've got a program set up like you describe.
the problem is I've noticed that my variables are NOT stable
this is it in a nutshell
1) show 3 options with radio buttons for each
2) based on above query a database and show a list of the records
(now it just dawned on my that I've
Does the manual actually say to use the tags php/php? Or is it the
normal tags of ?php ??
I run a small search engine and adding URL's is a bit of a pain so I thought
I would try to make it easier. Looking around I found a PHP function called
get_meta_tags which unsurprisingly, grabs the
Tried this and got parsing errors so php/php must be correct.
Richard Baskett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Does the manual actually say to use the tags php/php? Or is it the
normal tags of ?php ??
I run a small search engine and adding
Subject: Re: [PHP] PHP_SELF
Ok, I would like to thank Ralph Guzman Richard Lynch for your help.
I combined your ideas into my own working example.
Just posting here for archiving/discussion purposes...
// Input some data //
echo form action=\$PHP_SELF\ method=\POST\
enctype=\multipart/form-data
LOL,
Jon, you just made me realize the typo I had in my script.
Thanks a bunch. I had some ==, but there were two = which was making my head
hurt.
thanks for the post.
On Tue, 31 Jul 2001 09:16:26 +0100, Jon Haworth wrote:
if ($post = 1 $Age = ) {echo NO;}
else {echo YES;}
Now here is
On Tuesday 31 July 2001 04:59, Gerard Samuel wrote:
if ($post = 1 $Age = ) {echo NO;}
= is assignment. == is comparison
--
Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)
The use of COBOL cripples the mind; its teaching should, therefore,
be regarded as a criminal offence.
-
Ok, I would like to thank Ralph Guzman Richard Lynch for your help.
I combined your ideas into my own working example.
Just posting here for archiving/discussion purposes...
// Input some data //
echo form action=\$PHP_SELF\ method=\POST\
enctype=\multipart/form-data\\n;
echo 1. Age:br\n;
echo
?
If($HTTP_POST_VARS){
// check required fields
if(!age || !$name){
$formerror = You did not fill in all required fields;
}
...
// if form passed all error checks continue processing
if(!$formerror){
// continue processessing...
}
}
?
?
if ($post = 1 $Age = ) {echo NO;}
else {echo YES;}
Now here is what happens. On a first time view of the page it outputs
'NO' (Good). If I dont enter anything in the age field and submit the
form it outputs 'NO' (Good). If I enter a value into the age field and
submit, it outputs
HI
You can figure this out so you can work with one file. It's much
easier to maintain.
Here is an example. It's a simple RSVP form. ***Change line 100 to
use your own email address to receive the information. I wrote this
a while back so I'm not bragging about the html format or coding but
It's generally a whole lot better to do your form value checking with
Javascript. It'll be faster and alot less of a waste of your server
resources. IMHO, of course. :)
-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 5:30 PM
To: PHP
You wrote:
It's generally a whole lot better to do your form value checking with
Javascript. It'll be faster and alot less of a waste of your server
resources. IMHO, of course. :)
This really isn't that true because if a user has JavaScript disabled,
or is using a browser that doesn't support
Ideal scenario, a blank form is presented to the
user, and when
the form is submitted, do the logic check and act accordingly. Is it
possible using $PHP_SELF as the target, or do I have to use 2
files: a
form 'front end' with the php logic in the 'backend'??
Yes, this is possible, and
Fischer [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 5:48 PM
To: Erik H. Mathy; PHP
Subject: Re: [PHP] PHP_SELF
You wrote:
It's generally a whole lot better to do your form value checking with
Javascript. It'll be faster and alot less of a waste of your server
resources. IMHO
What I did was use javascript to make sure they filled out certain parts of
the form. I also created a php version in case they disabelled
javascripting. The way I did this was each input do this:
INPUT type=text name=Username value=? print $Username ?
When they first come into the site the
On Monday 30 July 2001 23:39, Erik H. Mathy wrote:
W...besides your everyday, run of the mill geek who hates
Javascript pop-ups, who really disables JavaScript? 95% of the users out
there don't ever touch the default browser settings. Also, the Javascript
1.0 has been around since,
I do this sort of thing all the time. The format I use typically
follows this logic.
The PHP file has four IF-ELSEIF-ELSE sections.
pg=1 or blank is the initial form
pg=2 is the error check looking at input values.
If it passes, pg is set to 3.
If not, set to 1. The
On Mon, 25 Jun 2001 13:08, Kent Sandvik wrote:
Hi, is there something silly I'm doing (latest PHP 4.0.5), when this
does not work at all:
---
class xCrumbs
{
function Render(){
echo $PHP_SELF;
}
}
$crumbs = new xCrumbs();
$crumbs-Render();
while
echo $PHP_SELF;
$PHP_SELF is a global variable. You're trying to call it from inside a
function, which won't work unless you declare it as global to the function
(unless you have some thing in the php.ini file set that I don't remember
off the top of my head what it's called which will make all that stuff
global
please try this:
pre
?
/*
Tells whether or not to register the EGPCS (Environment, GET, POST, Cookie,
Server) variables as global variables. You may want to turn this off if you
don't want to clutter your scripts' global scope with user data. This makes
the most sense when coupled with
is it realy everithing that you get from php or there is something missing ?
i mean usualy it helps basename() or base_name() cant remmember now
try it, but in your case it seems differently
almir
""Tommy"" [EMAIL PROTECTED] schrieb im Newsbeitrag
99i3q7$57q$[EMAIL
a common problem:
you have compiled PHP as CGI,
make it run as a module, and that problem will disappear.
well, if you really want to have it under CGI, try to check phpinfo() for a
solution
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL
Hi Scott,
Good question! $PHP_SELF is a global variable, so you need to declare it in
functions:
function a()
{
global $PHP_SELF;
print $PHP_SELF;
}
John
"Scott Fletcher" [EMAIL PROTECTED] wrote in message
98tjgv$40e$[EMAIL PROTECTED]">news:98tjgv$40e$[EMAIL PROTECTED]...
Hi!
I
Why does php self always show php4/php.exe? how do i take it off?
This is a known bug under *some* Win32 installations.
Use ?php phpinfo();? to figure out which variable has what you need in it,
and use that variable.
If you need to deploy on multiple platforms, you'll have to
You have compiled it as CGI, didn't ya?
recompile it as apache's module if you can so apache can give PHP_SELF the
right value,
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
This is not browser problem ...
here:
echo "BRA
HREF=\"$PHP_SELF?mode=sub_categorycategory=$categorysub_category=" .
urlencode($subcategories[$index]) . "\"" . $subcategories[$index] ."/A';
This will always work.
Cheers,
Maxim Maletsky
-Original Message-
From: John Vanderbeck
PROTECTED]
Subject: Re: [PHP] $PHP_SELF in Netscape PART 2
You are using commas instead of periods, use ".$PHP_SELF." instead of
",$PHP_SELF," (and for the other instances as well).
Huh? I am going off of the example from the PHP documentation:
From http://w
You are using commas instead of periods, use ".$PHP_SELF." instead of
",$PHP_SELF," (and for the other instances as well).
Huh? I am going off of the example from the PHP documentation:
From http://www.php.net/manual/en/function.urlencode.php
echo 'A HREF="mycgi?foo=', urlencode ($userinput),
1 - 100 of 108 matches
Mail list logo