albertramsbottom Posted January 11, 2007 Share Posted January 11, 2007 Hi thereI am a total newbie at PHP after being an ASP, ASP.net developer for the last ten years i decided yesterday that i would attempt to move over to PHP.My first project was to pass two variables from a simple form to another page and write them out. Easy and yes it worked on my local machine, well when i say worked i could only get it to work via the GET method rather than the POST. why i dont know!!Anyway when i uploaded it to my server it doesnt work! The variables seem to be in the URL and there are no errors in my PHP File when it writes out the HTML. Its just that the spaces where i have <?php echo ($_GET["Course"]); ?> there is no text. If that makes sense. It works perfectly well on my local machine. Is PHP enabled on my server!! It is a corporate server if that makes any difference.Heres the code anyway:Form: <form name="book" method="get" action="test.php"> <input name="course" type="hidden" value="Foundation Food Hygiene Certificate" /> <input name="cost" type="hidden" value="45.00" /> <input type="submit" name="Submit" value="Book Now" class="SubmitButton" /> </form>Test.php:<P>Thank you for your intrest in our <b><?php echo ($_GET["Course"]); ?>!</b>any ideas would great!!!! Quote Link to comment https://forums.phpfreaks.com/topic/33766-strange-server-behavouir/ Share on other sites More sharing options...
HuggieBear Posted January 11, 2007 Share Posted January 11, 2007 PHP is case sensitive...Change this [code=php:0]<?php echo ($_GET["Course"]); ?>[/code] to this [code=php:0]<?php echo ($_GET['course']); ?>[/code] I've replaced the double quotes with single quotes too, but that's just my preference.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/33766-strange-server-behavouir/#findComment-158350 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.