SyCo
05-07-2008, 05:41 PM
This is really wierd.
I have a form that I wrote years ago that is saving some customer info. As far as I know it's been ticking along without incident for years. Then again this might alway have been happening and no-one reported the problem.
In part of the form there's a complete list of UK counties ina select, here's an excerpt.
<select name="county_update" class="text">
(more listed before)
<option <?if($county_update=="Nottinghamshire") { print "selected"; }?>><font class="text">Nottinghamshire</option>
<option <?if($county_update=="Oxfordshire") { print "selected"; }?>><font class="text">Oxfordshire</option>
<option <?if($county_update=="Rutland") { print "selected"; }?>><font class="text">Rutland</option>
<option <?if($county_update=="Shropshire") { print "selected"; }?>><font class="text">Shropshire</option>
<option <?if($county_update=="Somerset") { print "selected"; }?>><font class="text">Somerset</option>
<option <?if($county_update=="Staffordshire") { print "selected"; }?>><font class="text">Staffordshire</option>
<option <?if($county_update=="Suffolk") { print "selected"; }?>><font class="text">Suffolk</option>
<option <?if($county_update=="Surrey") { print "selected"; }?>><font class="text">Surrey</option>
(more listed after)
So it all works fine, except when the user tries to update their details and chooses the county 'Somerset'
When that happened the site redirected itself back to the index page.
I have no redirects to the index page. I do have a redirect to the login page (login.php) as this area is password protected but there's no redirects to the index page on any of the scripts. Nothing should redirect this to the index page except maybe a server diretive as the script name becomes undetermined and it's left looking to serve nothing? I'm only guessing at what it might be here.
If I select anything other than somerset its OK.
If I replace
<option <?if($county_update=="Somerset") { print "selected"; }?>><font class="text">Somerset</option>
with
<option <?if($county_update=="Testing") { print "selected"; }?>><font class="text">Testing</option>
or even (space added)
<option <?if($county_update=="Somerse t") { print "selected"; }?>><font class="text">Somerse t</option>
Then it updates just fine.
WTF is going on?
Somerset is such a nice place, what could my script possibly have against it???
I have a form that I wrote years ago that is saving some customer info. As far as I know it's been ticking along without incident for years. Then again this might alway have been happening and no-one reported the problem.
In part of the form there's a complete list of UK counties ina select, here's an excerpt.
<select name="county_update" class="text">
(more listed before)
<option <?if($county_update=="Nottinghamshire") { print "selected"; }?>><font class="text">Nottinghamshire</option>
<option <?if($county_update=="Oxfordshire") { print "selected"; }?>><font class="text">Oxfordshire</option>
<option <?if($county_update=="Rutland") { print "selected"; }?>><font class="text">Rutland</option>
<option <?if($county_update=="Shropshire") { print "selected"; }?>><font class="text">Shropshire</option>
<option <?if($county_update=="Somerset") { print "selected"; }?>><font class="text">Somerset</option>
<option <?if($county_update=="Staffordshire") { print "selected"; }?>><font class="text">Staffordshire</option>
<option <?if($county_update=="Suffolk") { print "selected"; }?>><font class="text">Suffolk</option>
<option <?if($county_update=="Surrey") { print "selected"; }?>><font class="text">Surrey</option>
(more listed after)
So it all works fine, except when the user tries to update their details and chooses the county 'Somerset'
When that happened the site redirected itself back to the index page.
I have no redirects to the index page. I do have a redirect to the login page (login.php) as this area is password protected but there's no redirects to the index page on any of the scripts. Nothing should redirect this to the index page except maybe a server diretive as the script name becomes undetermined and it's left looking to serve nothing? I'm only guessing at what it might be here.
If I select anything other than somerset its OK.
If I replace
<option <?if($county_update=="Somerset") { print "selected"; }?>><font class="text">Somerset</option>
with
<option <?if($county_update=="Testing") { print "selected"; }?>><font class="text">Testing</option>
or even (space added)
<option <?if($county_update=="Somerse t") { print "selected"; }?>><font class="text">Somerse t</option>
Then it updates just fine.
WTF is going on?
Somerset is such a nice place, what could my script possibly have against it???