* 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 o
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> differen
* 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
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.
PHP_
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 Mai
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 /c/hosting
$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 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 k
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.
an
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.
>
>
> - Ori
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
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('/') )
or
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 withi
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 quote
> 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 rea
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 d
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 "action=\"$_SERVER['PHP_SELF']\">\n";
echo ('' . "\n");
works for me (moved the variable out
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 "action=\"$_SERVER['PHP_SELF']\">\n";
---
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
1) from commandline
then [SCRIPT_NAME] => info70.php
is set correctly
2) direkt via http request from browser
then PHP_SELF = htdocs3/b
nip
How can I get this value when I run 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 t
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 Johannes, hello all,
>
>I compiled it as CGI-php
>and the variable $_SERVER['PHP
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 Decembe
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 ph
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
--
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
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 answers
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 -> Gre
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 D
Try "mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 6:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $PHP_SELF
SysInfo: Apache/1.3.24 (Win32) PHP/4.1.3-dev
I have a question that could be Apache, could be php, but I'm so new to this
I have to ask: what is wrong with my code for the form acti
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 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:
> 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 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, o
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:
>
> function questions()
> {
> ?>
> U face="Times New Roman" size="2">
>
>
> function questions()
> {
[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 now, freak later!"
--
PHP General Mailing List (ht
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/Warning:%20%20Undefined%20variable:%20%20PH
> P_SELF%20in%20c:/inetpub/wwwroot/pages.inc%20on%20line%2035 >?page=ques
Here's the chunk of code in the include file that gave me that. I should
have put it with the original post:
U
Questions
Insert questions here.
Thanks,
Dave
"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in message
1015974570.2134.94.camel@ali">news:1015974570.2134.94.camel@al
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/Warning:%20%20Undefined%20variable:%20%20PH
P_SELF%20in%20c:/inetpub/wwwroot/pages.inc%20on%20line%2035?page=questions
"Lars Torben Wilson" <[EMAIL PROTECTED]> wrote in messa
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
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
> -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 si
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
>
>
>
>
> Feedback
>
>
> $for
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 ?
Yo
> 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.
> 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 coul
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 {$_
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.
> >
> >
> http://www.php.net/manual/
> $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
Ca
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
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
>
>
>
>
> Feedback
>
>
> $form_block
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 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
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 sam
> 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 there.
Now, if the file this form is in gets renamed from foo.php
to bar.php, the form won't break.
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Develop
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 PROTECTED]
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 j
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){
// be
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]
> 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
> 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 v
c: "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 :
> > True. But take the following function:
> >
> 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
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 $HTTP
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
S
> > 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. A
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
> 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 »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)
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
> function menu( $theurl)
> {
> //global $u ;
> $u = $SCRIPT_FILENAME;
> echo $u;
> echo $theurl;
> }
> ?>
>
> Hello there !!!
>
>
Variable scope.
You need a "global $SCRIPT_FILENAME;" at the top of the function.
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-ma
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 m
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 been
Tried this and got parsing errors so " must be correct.
"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does the manual actually say to use the tags ""? Or is it the
> normal tags of ""?
>
> > I run a small search engine and adding URL's is
What I've said.
I might just check out trying out as they aren't the brightest
bunch of individuals.
- Original Message -
From: "Richard Baskett" <[EMAIL PROTECTED]>
To: "Phil Latio" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: M
Does the manual actually say to use the tags ""? Or is it the
normal tags of ""?
> 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 contents
Wednesday, August 01, 2001 12:50 PM
To: PHP
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 "\n";
ec
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 "\n";
echo "1. Age:\n";
echo " \n";
echo "2. Email:\n";
echo " \n";
echo " \n";
// Star
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
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";}
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
> 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
echo "$formerror";
" METHOD="post">
">
">
-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 3:30 PM
To: PHP
Subject: [PHP] PHP_SELF
Im trying to introduce some logic into a form.I am unsing $PHP_SELF as
the target.
I personally think it is best to display a form error on the form itself,
rather than given them a blank page that shows an error, then have them
click a button or link to go back to the form. Here is somewhat a quick and
dirty example of how I go about forms and error checking. For this example I
So far this message and another who mentioned $HTTP_POST_VARS[]
made a small light go off in my head. Not enough to get the script
woriking, but it made me think. Its not clear, but I sort of came up
with another way, but I dont know if its doable
.
In my form I have a hidden element called
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 adv
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,
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:
When they first come into the site the $Username value will be blank, but
once they have submitt
ssage-
> From: Ryan 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
> > Javasc
>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
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 suppo
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
>
$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
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 $P
please try this:
""Steve Haemelinck"" <[EMAIL PROTECTED]> wrote in message
000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli">news:000401c0b9bb$4aaa1fa0$0200a8c0@shaemeli...
> Anybody got an idea why $PHP_SELF isn't working with me?
>
> I think because I have set my register_globals to off, but how
simple
echo basename($PHP_SELF) or base_name check docu
almir
""Erick Papadakis"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
99foro$tig$[EMAIL PROTECTED]">news:99foro$tig$[EMAIL PROTECTED]...
> hi,
>
> i am using my program
>
> http://localhost/test.php
>
> inside this program is a form, which
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 PROTECTED]">news:99i3q7$57q
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 PR
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
Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Brandon Feldhahn [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2001 9:27 AM
To: PHPBeginner.com
Subject: Re: [PHP] php_self
well i have windows so how do i recompile it?
&
1 - 100 of 114 matches
Mail list logo