Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Folwoing ECHO will not display in Firefox?

    Hi , quick question, why does the following not display in firefox
    Code:
    <?php echo $_POST['answer0']; ?><br>
    <?php echo $_POST['answer1']; ?><br>
    <?php echo $_POST['answer2']; ?><br>
    <?php echo $_POST['answer3']; ?><br>

    Thanks,
    jake

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    php isn't browser dependant, so if it doesn't work in one browser, it won't work in any. My guess is that if it's showing in IE and not FF, then you've got a html problem somewhere

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that, i will give it a go in the morning.

    Jake

  • #4
    New Coder
    Join Date
    Apr 2005
    Location
    USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solid Advice

    Solid Advice... PHP is browser independent. However, if you find that your code works on one browser, and not the other, you may wish to clear the cache of the browsers. If a page is cached, and you uploaded a new version of it you will not see the new version. I can not tell you how many times i forget that little fact. So, if you code works in one browser, but not the other, chances are you just need to clear your cookies, cache, history, etc.

  • #5
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Another piece of advice to add to skky's,
    Sometimes not just the browser, but your ISP may cache your pages. I remember when I first started scripting, I had been frustrated to no end due to this. Later I found that I can have my own testing environment, which is beyond the control of the ISP so long as your referring to the page using a loopback address.
    In other words, ensure you have a testing environment on your PC.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #6
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have cleared my cache and cookies, and I am running a testing server on my PC not through the net and my host. Clearing the cookies and cache has not resolved the problem. here is the ful code:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Marking AS Test</title>
    </head>
    
    <body>
    TEST
    <?php echo $_POST['answer0']; ?><br>
    <?php echo $_POST['answer1']; ?><br>
    <?php echo $_POST['answer2']; ?><br>
    <?php echo $_POST['answer3']; ?><br>
    <?php echo $_POST['answer4']; ?><br>
    <?php echo $_POST['answer5']; ?><br>
    <?php echo $_POST['answer6']; ?><br>
    <?php echo $_POST['answer7']; ?><br>
    <?php echo $_POST['answer8']; ?><br>
    <?php echo $_POST['answer9']; ?><br>
    	
    <?php echo $_POST['term0']; ?><br>
    <?php echo $_POST['term1']; ?><br>
    <?php echo $_POST['term2']; ?><br>
    <?php echo $_POST['term3']; ?><br>
    <?php echo $_POST['term4']; ?><br>
    <?php echo $_POST['term5']; ?><br>
    <?php echo $_POST['term6']; ?><br>
    <?php echo $_POST['term7']; ?><br>
    <?php echo $_POST['term8']; ?><br>
    <?php echo $_POST['term9']; ?><br>
    
    
    </body>
    </html>

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Has it actually been sent from a form? Otherwise I see no setting of the $_POST variables. Does the rest of the source show fine from FF and IE?
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #8
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, yes its been sent from a form to this file. I can get the following to print in FF
    Code:
    <?php $test = "this is a test string"; ?>
    <?php print ($test); ?>
    But if I use print for the $_POST that does not work either.
    I have uploaded it onto my hosts server now and it still does not display in FF.

    Jake
    Last edited by jakenoble; 09-24-2005 at 01:10 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •