Please add this to b.php, and tell me what it outputs:
<?php
echo $_SERVER['QUERY_STRING'];
print_r($_GET);
?>
Ian Bambury wrote:
5.0.4-Win32 with Xitami 2.4
I posted here because it seemed probable that I need to set a switch
somewhere, although I haven't touched anything vital AFAIK. Xitami is
passing the file to PHP all right, and PHP is processing it to some
extent. The source code for the resultant b.php page is
<html>
<head><title></title></head>
<body>
name:
<br>
Hello<br>
</body>
</html>
so it's recognising the tag, it manages the echo. I've just tried
<html>
<head><title></title></head>
<body>
name:
<?php
echo $_GET['xname'];
$v[0] = "Hello";
?>
<br> ...
<?php
echo $v[0];
?>...
<br>
</body>
</html>
and still get "Hello" so it manages arrays, I've changes name to xname
in case it's a keyword clash or something silly like that, the query
string has the data there, but $_GET (and $_POST) just don't happen.
I'm running out of ideas.
Ian
----- Original Message ----- From: "Michael W." <[EMAIL PROTECTED]>
To: <php-install@lists.php.net>
Sent: Wednesday, June 29, 2005 4:29 PM
Subject: Re: [PHP-INSTALL] Can't get $_GET to work
What version of PHP are you using?
Ian Bambury wrote:
Thanks for that, unfortunately it hasn't fixed the problem, true
though it may be.
files now read:
<html>
<head><title></title></head>
<body> name: <form action="b.php" method="get">
<input type="text" name="xname"><br>
<input type="submit" value="send">
</form>
</body>
</html>
------------------
<html>
<head><title></title></head>
<body>
name:
<?php
echo $_GET['xname'];
$v = "Hello";
?>
<br>
<?php
echo $v;
?>
<br>
</body>
</html>
Querystring = http://127.0.0.1/b.php?xname=fred
...but still no joy. The "Hello" turns up, though.
Thanks,
Ian
.