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
amirreza
Forum Newbie
Posts: 3 Joined: Sun May 03, 2009 12:00 pm
Post
by amirreza » Sun May 03, 2009 12:17 pm
hi everybody
I am a biginer in php
could you tell me why this code doesn't work
page1.htm
Code: Select all
...
<form action="page2.php" method="post">
<input type="text" name="mytext" />
<input type="submit" value="click me" />
</form>
...
page2.php
why page2.php show nothing?
thanks
jazz090
Forum Contributor
Posts: 176 Joined: Sun Apr 12, 2009 3:29 pm
Location: England
Post
by jazz090 » Sun May 03, 2009 12:30 pm
you are trying to use globals which is now deprecated, you must use superglobals to access that value:
i.e.
amirreza
Forum Newbie
Posts: 3 Joined: Sun May 03, 2009 12:00 pm
Post
by amirreza » Sun May 03, 2009 12:40 pm
hi jazz090
i just test it and get this error
Parse error: syntax error, unexpected T_PRINT in C:\Inetpub\vhosts\neginled.com\httpdocs\test\test\page2.php on line 3
what can I do?
amirreza
Forum Newbie
Posts: 3 Joined: Sun May 03, 2009 12:00 pm
Post
by amirreza » Sun May 03, 2009 12:43 pm
thanks a lot my freand
I had a mistake
it works excellent