View Full Version : Folwoing ECHO will not display in Firefox?

09-24-2005, 12:45 AM
Hi , quick question, why does the following not display in firefox

<?php echo $_POST['answer0']; ?><br>
<?php echo $_POST['answer1']; ?><br>
<?php echo $_POST['answer2']; ?><br>
<?php echo $_POST['answer3']; ?><br>


09-24-2005, 01:13 AM
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

09-24-2005, 03:05 AM
Thanks for that, i will give it a go in the morning.


09-24-2005, 08:47 AM
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.

09-24-2005, 10:44 AM
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.

09-24-2005, 11:36 AM
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:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Marking AS Test</title>

<?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>


09-24-2005, 12:50 PM
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?

09-24-2005, 12:57 PM
Hi, yes its been sent from a form to this file. I can get the following to print in FF

<?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.