riz-man
03-04-2008, 02:14 PM
I’ve worked on a PHP website that when uploaded to the Internet works perfectly fine. However, before I uploaded the website to my server, I uploaded it to my Apache directory on my computer (I have the server installed locally). One of the pages uses a drop down list (in a form) and in this drop down list there are two options – 1) “Sort Alphabetically” and 2) “Sort Numerically (by id)”.
When viewing the site locally, why do I see “selected=”selected”>" infront of the “Sort Numerically (by id)” option? The coding does not work on my machine locally because of this. Please view the attached file for your reference.
Does anyone know why this happens? Why do I get the problem locally but not when I upload on the internet?
It's not a serious problem as it works when I upload the site to the Internet but I would like to know for my own reference and because it means that I cannot test that particular part of the website locally.
The actual coding where this apparent problem happens is as follows:
<option value="cat_id"<? if ($shopConfig['categorySort'] == 'cat_id') { ?> selected<? } ?>>Sort Numerically (by id)</option>
Are all the <? ?> } in the right places?
Thank you for your time.
Riz
When viewing the site locally, why do I see “selected=”selected”>" infront of the “Sort Numerically (by id)” option? The coding does not work on my machine locally because of this. Please view the attached file for your reference.
Does anyone know why this happens? Why do I get the problem locally but not when I upload on the internet?
It's not a serious problem as it works when I upload the site to the Internet but I would like to know for my own reference and because it means that I cannot test that particular part of the website locally.
The actual coding where this apparent problem happens is as follows:
<option value="cat_id"<? if ($shopConfig['categorySort'] == 'cat_id') { ?> selected<? } ?>>Sort Numerically (by id)</option>
Are all the <? ?> } in the right places?
Thank you for your time.
Riz