transfer parameters
| From: | astenios | Date: | Mon, 19 Nov 2001 22:35:28 +0000 |
| Subject: | transfer parameters | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-75163@lists.php.net to get a copy of this message | ||
Hi
I'm trying to transfer a variable from one web-page to another
The source page (http://astenios.hn.org/php/wall.php) is like
echo '<TD> <CENTER> <A HREF="/php/detall.php?codi=', urlencode
($row[1]),
'">';
echo '<SPAN id=Texte>', $row[1], '</SPAN> </A> </CENTER>
</TD>';
and target(http://astenios.hn.org/php/detall.php) catch it by:
$codi = urldecode($codi);
echo 'codi = ', $codi;
This do not work.
isset($codi) returns TRUE
empty($codi) returns TRUE
Something similar ocurrs with:
<?php
if (!isset($PHP_AUTH_USER))
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
$fich = file("php/password.txt");
$i=0; $validado=false;
while ($fich[$i] && !$validado)
$campo = explode("|",$fich[$i]);
if (($PHP_AUTH_USER==$campo[0]) && ($PHP_AUTH_PW==chop($campo[1])))
$validado=true;
$i++;
}
if (!$validado)
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
?>
It seems like the variables doesn't store the values.
What I'm doing wrong??
Thank's in advance and sorry for my english.
Astenios