so I have a script that I run from my sites 404 page.
Basically it loads a frame which works good 🙂 where the variables like the url (past the main site) are passed to the page a a query string.
This also works just fine, now here's where I start to have some issues.
I was originally using str_replace() in place of eregi, but neither has worked...
so let's say $q is my query string for this exmample...
if(eregi("parta", $q) {
//part a detective set some vars to use
//to get other vars from the db (an id)
} elseif (eregi("partb", $q) {
//same as part a, but for part b
} elseif (eregi("partc", $q)) {
//same as part a, but for part b
} else {
//no query string, do this
}
//then I get my query and run it
//depending on the above statement
//now I have a javascript here that also
//works just fine..
//it just runs window.location=''
//and changes it to what I need....
now the problem is that no matter what my query string has in it... it runs up "parta" as being true through the eregi function....
why would it do this? Can it not handle elseif statements?
I have done something similar before without any problems so i'm a bit confused.