Problens with GET

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
molandim
Forum Newbie
Posts: 19
Joined: Thu Feb 20, 2003 11:33 am
Location: Brazil
Contact:

Problens with GET

Post by molandim »

Hi everyone. I am novice in Php. I installed easyphp in my computer, for see my php pages. So i try pass information to one page to another with GET..

Didn´t work...

I do now why, Maybe wrong code or the apache form this software is broken, i do know...

Look my code
send.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
</head>

<body>
<form action="http://localhost/script.php" method="get">
<input type="text" name="nome" size="5">
<input type="submit" name="submit">

</form>


</body>
</html>
Page that take this information

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<title>Untitled</title>
</head>

<body>
Go 
<?php 
$oi = $_POST&#1111;'nome'];
Echo "$oi";
  ?>

</body>
</html>
I see on the url that the information is there, but the php only show GO and don´t show the variable $oi..

WHY???? :( :( :(
SlyckRay
Forum Newbie
Posts: 1
Joined: Sun Apr 13, 2003 11:09 am

Post by SlyckRay »

Greetings.

When using method="get" you must use $_GET not $_POST. i recommend you use method="post" and leave the $_POST variable so that info like a users name isn't pasted to the link.


Ray
Post Reply