JSHINER Posted October 30, 2006 Share Posted October 30, 2006 Hello,Right now I have a form, and you enter your zip code. Then:if(file_exists("/$zip.php")){ include("/$zip.php");}else {echo ' Text ';}However, some towns have multiple zip codes. For example. Town X could have zip codes 00000, 00001, 00002. BUT, there is only ONE zip.php page for each town. So the town's page would be 00000.php.How do I make it so if you type 00001 or 00002, etc. for your zip, it includes 00000.php.Thank you,James Quote Link to comment Share on other sites More sharing options...
JSHINER Posted October 30, 2006 Author Share Posted October 30, 2006 Anyone? Quote Link to comment Share on other sites More sharing options...
JSHINER Posted October 30, 2006 Author Share Posted October 30, 2006 Can someone atleast point me in the right direction... please... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted October 30, 2006 Share Posted October 30, 2006 Please let us think about this for a while and do not bump sooner than 3 or 4 hours.What have you tried?We are not here to write your code, but to help you with code you've already written.Ken Quote Link to comment Share on other sites More sharing options...
JSHINER Posted October 30, 2006 Author Share Posted October 30, 2006 Hi Ken,I appreciate your response. I understand you are not here to write code, nor would I expect you to (for free that is).I first thought about duplicating the 00000.php page so 000001.php would exist, but that brought up the problem that below that include were links to "site.com/$zip/link.php. So that's out of the question.I also tried if($zip=="00001" || $zip=="00002")... and was going to have that redirect to filename.php?action=search&zip=00000. But that did not work either.If you could point me in the right direction as to how I can accomplish this, I would greatly appreciate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.