hush Posted April 9, 2007 Share Posted April 9, 2007 hello i am looking forward to posting at this forum. i am a member at a few others. just started to do php but have programed in other languages (C, VB.NET and shell) but want to get into DB's and the such like. anyway enough of my mindless drivel. i am a little embarrassed to say that i can't get my first program to work ( close as dam to hello world). i am learning from a php4 book and using php5, on apache, on ubuntu- maybe relevant, not sure, as the code looks ok but does not work (i say this but what do i know this is my first program). if some one could take a quick look and point out where i have gone wrong that would be great. <html> <head></head> <body> <form method=post action="testphp.php"> what are your favorite web sites?<br> <textarea name="websites" cols="50" rows="5"> http:// http:// http:// http:// http:// </textarea> <br> <br> <input type=submit> </form> </body> </html> <html> <head></head> <body> your favorite sites are: <?php echo $websites; ?> </body> </html> i think that the scripting engine is working as i can initialize and echo variables if i use them on the same page. hush Quote Link to comment https://forums.phpfreaks.com/topic/46324-get-and-post-not-working/ Share on other sites More sharing options...
wildteen88 Posted April 9, 2007 Share Posted April 9, 2007 Try $_POST['websites'] instead. Your code is using old coding syles. it require register_globals - which is now depreciated and is being phased out. You should update your coding style to use superglobals to get data from GET, POST, COOKIE, SESSION, SERVER etc. Quote Link to comment https://forums.phpfreaks.com/topic/46324-get-and-post-not-working/#findComment-225368 Share on other sites More sharing options...
hush Posted April 19, 2007 Author Share Posted April 19, 2007 Thanks, that worked. That is my first step to being a guru. Quote Link to comment https://forums.phpfreaks.com/topic/46324-get-and-post-not-working/#findComment-233500 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.