Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Passing values - Problems with the link way

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Passing values - Problems with the link way

Postby fresiafunk » Thu Aug 22, 2002 6:30 am

I have been working on a proyect since last year using php 4.0... and i have no problems until i update to PHP 4.2.1... This version come with great security improvements like Global_variables = OFF , $_SESSION, $_POST, $_GET , etc.

Actually i was passing values from a page to other in two ways :

1) using forms ... and post the values to other pages
2) using links

After the actualization i have to correct my code to adapt it to $_POST in forms ..and it works perfectly..

However the link way doesn't work under GLOBAL_VARIABLES = OFF...

for example i use:

<a href="page2.php?var=<? echo $value1;?>">EVALUATE! </a>

so i could use $var in page 2 with the value = $value1

however , with GLOBAL_VARIABLES OFF it doesn't work... is there another way for passing values beetween pages not using forms way ?

Which is the best way, for correct this situation under PHP 4.2.1 or 4.2.2 ?

THANKS :cry:
User avatar
fresiafunk
New php-forum User
New php-forum User
 
Posts: 8
Joined: Mon Aug 12, 2002 5:17 am
Location: CHILE - SOUTH AMERIKA - Land of Dreams and Girls

Postby DoppyNL » Thu Aug 22, 2002 6:38 am

A lot of variables moved to an array with that security update, read the manual to find out where to find them exactly:
http://www.php.net/manual/en/reserved.variables.php

Greetz Daan
DoppyNL
 

Postby alsaffar » Thu Aug 22, 2002 6:52 am

Hi fresiafunk,

Try it this way, I think it'll work cause I faced the same problem before.

<A HREF="pageName.php?Offset=<? echo $_GET['varName']; ?>">

HaVe a GooD Day ;)

Ali
alsaffar
New php-forum User
New php-forum User
 
Posts: 4
Joined: Wed Aug 14, 2002 11:49 am

Postby Jay » Thu Aug 22, 2002 10:45 am

On page 2 use $_GET['var'] to access the value, not $var!
Jay
 

Postby fresiafunk » Thu Aug 22, 2002 6:29 pm

Thanks... :lol: ... the $_GET['var'] works !!!!!
User avatar
fresiafunk
New php-forum User
New php-forum User
 
Posts: 8
Joined: Mon Aug 12, 2002 5:17 am
Location: CHILE - SOUTH AMERIKA - Land of Dreams and Girls


Return to PHP coding => General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron