p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Problems using the global variable $PHP_SELF


Message #1 by "Debra Scott" <hlawebservice@h...> on Wed, 13 Feb 2002 22:46:44
Hi,

I am new to using any web programming language.  I am learning by trial 

and many errors.  Could anyone give me an idea of why when I use the 

following in an .html file, the result in the menu line says the file can 

not be found:

<form method="post" action="<?php echo $PHP_SELF?>">



I am trying to send the information directly to a mysql database.  When I 

store the queries in a different .php file, it works correctly.  When I 

use this variable, the file can not be found.

Thank you for any help you can give me in advance,

Debra
Message #2 by "Hermawan Haryanto" <hermawan@h...> on Thu, 14 Feb 2002 05:49:51 +0700
Hi there,



This is php starter tag: <?php

So, it supposed to be written on PHP page, not HTML page. So if you still

wanna use that <?=$PHP_SELF;?> then you must rename your .html file to .php



Thanks



Hermawan Haryanto

hermawan@h...

----- Original Message -----

From: "Debra Scott" <hlawebservice@h...>

To: "beginning php" <beginning_php@p...>

Sent: Wednesday, February 13, 2002 10:46 PM

Subject: [beginning_php] Problems using the global variable $PHP_SELF





> Hi,

> I am new to using any web programming language.  I am learning by trial

> and many errors.  Could anyone give me an idea of why when I use the

> following in an .html file, the result in the menu line says the file can

> not be found:

> <form method="post" action="<?php echo $PHP_SELF?>">

>

> I am trying to send the information directly to a mysql database.  When I

> store the queries in a different .php file, it works correctly.  When I

> use this variable, the file can not be found.

> Thank you for any help you can give me in advance,

> Debra




$subst('Email.Unsub').

>



Message #3 by "Nikolai Devereaux" <yomama@U...> on Wed, 13 Feb 2002 14:58:42 -0800

> So, it supposed to be written on PHP page, not HTML page. So

> if you still wanna use that <?=$PHP_SELF;?> then you must

> rename your .html file to .php



Another solution would be to configure your web server to process .html

files with the php interpreter.





Here's an interesting note, btw -- on my Win2K machine running php 4.0.6,



<?=$variable;?> will echo $variable but <?php=$variable;?> will NOT.



bug?



Message #4 by "Krister" <krister@m...> on Thu, 14 Feb 2002 02:00:37 +0100
Hi

How about useing it in a .php file.



Krister

----- Original Message -----

From: "Debra Scott" <hlawebservice@h...>

To: "beginning php" <beginning_php@p...>

Sent: Wednesday, February 13, 2002 10:46 PM

Subject: [beginning_php] Problems using the global variable $PHP_SELF





> Hi,

> I am new to using any web programming language.  I am learning by trial

> and many errors.  Could anyone give me an idea of why when I use the

> following in an .html file, the result in the menu line says the file can

> not be found:

> <form method="post" action="<?php echo $PHP_SELF?>">

>

> I am trying to send the information directly to a mysql database.  When I

> store the queries in a different .php file, it works correctly.  When I

> use this variable, the file can not be found.

> Thank you for any help you can give me in advance,

> Debra




$subst('Email.Unsub').

>



Message #5 by "Debra Scott" <hlawebservice@h...> on Thu, 14 Feb 2002 02:04:04
Thanks for all the help.  I wish I had known about this source for help 

before now!

Debra
Message #6 by "Peter Simard" <peter@p...> on Fri, 15 Feb 2002 07:16:03
"  I wish I had known about this source for help before now! "



also check out http://www.devshed.com  for thier PHP forum, tutorials 

etc.  You'll "see" many of the same folks as here too.  


  Return to Index