You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rabea Husseis <hu...@hotmail.com> on 2002/04/24 18:27:01 UTC

Passing Variables to php script

Hello..

I'm using:
PHP 4.2.0
MySql 3.23.49
Apache 1.3.22

trying to pass variables from HTML Form with POST METHOD, to a php file... 
but for some reason the variable is not passed to the php file though I can 
see it in the address bar
"http://..../file.php?info=yes"
when adding <? echo "$info" ?> in the php nothing appears.
Is there's any config I have to do in httpd.conf?
Any reasons for that?

Thanx
Rabea

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Passing Variables to php script

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rabea Husseis wrote:
> 
> I'm using:
> PHP 4.2.0
> MySql 3.23.49
> Apache 1.3.22
> 
> "http://..../file.php?info=yes"
> when adding <? echo "$info" ?> in the php nothing appears.
> Is there's any config I have to do in httpd.conf?
> Any reasons for that?

Yes.  It's a security restriction imposed by PHP.  You can
access it with

<?php echo $_GET['info']; ?>

instead.  See the PHP 4.2 changelog for details, or look for
$_GET and $_POST on the PHP site.
-- 
#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Passing Variables to php script

Posted by Gilles GROS <gi...@whitepj.com>.
in php 4.2
the POST variable are not set by default in the php.ini
see : http://us2.php.net/release_4_2_0.php

Gilles

> -----Original Message-----
> From: Rabea Husseis [mailto:husseis_amm@hotmail.com]
> Sent: Wednesday, April 24, 2002 9:27 AM
> To: users@httpd.apache.org
> Subject: Passing Variables to php script
>
>
> Hello..
>
> I'm using:
> PHP 4.2.0
> MySql 3.23.49
> Apache 1.3.22
>
> trying to pass variables from HTML Form with POST METHOD, to a
> php file...
> but for some reason the variable is not passed to the php file
> though I can
> see it in the address bar
> "http://..../file.php?info=yes"
> when adding <? echo "$info" ?> in the php nothing appears.
> Is there's any config I have to do in httpd.conf?
> Any reasons for that?
>
> Thanx
> Rabea
>
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org