Jump to content

Strange Server Behavouir


albertramsbottom

Recommended Posts

Hi there

I 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!!!!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.