Re: POST/GET problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to Rafael and George (replied off list).

Problem sorted. There is absolutely *nothing* to beat community support.

Regards

Martyn
"Rafael Soares" <design_animation@xxxxxxxxxxxx> wrote in message
news:php.windows-24894@xxxxxxxxxxxxxxx
You probably have register_globals turned off (this is a question of
security and performance).

You can turn it on changing your php.ini file, it's probably located in
C:\WINDOWS

Or try this in the beginning of your PHP file:

<?php

$name = $_POST['name'];
$surname = $_POST['surname'];

?>

Rafael Soares - AgênciaM
Fone:  +55 11 4616-1394

-----Mensagem original-----
De: Martyn Kinder [mailto:martyn@xxxxxxxxxx]
Enviada em: sexta-feira, 5 de novembro de 2004 07:25
Para: php-windows@xxxxxxxxxxxxx
Assunto:  POST/GET problem

Hi,

I am not sure if this is the correct group for this problem, so apologies if
I have got this totally wrong.
I have just installed PHP5 on a Windows XP machine with IIS (PWS).

phpinfo() seems OK.

However, when I try the following test script:

name.html looks like:

<html>
<body>
<center>
<FORM METHOD="POST" ACTION="name2.php">
 <table>
        <tr>
                <th width="15%" nowrap><b>First Name</b></th>
                <td width="35%"><input type=text name = "name"></td>

                <th width="15%" nowrap><b>Last Name</b></th>
                <td width="35%"><input type=text name = "surname"></td>
        </tr>
 </table>
 <table>
   <INPUT TYPE="SUBMIT" VALUE="Submit" NAME="Submit">
   <INPUT TYPE="RESET" VALUE="Reset" NAME="Reset">
 </table>
</Form>
</center>
</body>
</html>

 and

name2.php looks like:
<html>
<body>
<?php

$surname=strtoupper($surname);

?>
<?php echo("<h3>Hello"),  $name, (" "), $surname, ("</h3>");?>
</body>
</html>

When I run the name.html script:

I get

Notice: Undefined variable: surname in c:\Inetpub\wwwroot\name2.php on line
5

Hello
Notice: Undefined variable: name in c:\Inetpub\wwwroot\name2.php on line 9

I think this works OK on PHP4 and Apache.

I have looked through the FAQ's etc. But I'm not sure if this is an idiot
fault or a configuration fault.

Is there a requirement to declare variables in PHP5 now?

Any suggestions please!

Thanks

Martyn

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux