LouiseS89 Posted January 25, 2017 Share Posted January 25, 2017 Hi guys, I know the basics of HTML but I've come to you for some help, hopefully. Here's what I'm trying to achieve... I want to create a landing page for my company that contains a simple form entry. "Enter your town" ......... > (Hit Submit).....> Redirects to one of two URL's depending on what they've entered.i.e. IF contains "Exeter" redirect to *URL1*IF DOES NOT contain "Exeter" redirect to *URL2* Is anyone able to write me a full code, form and all? Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/ Share on other sites More sharing options...
requinix Posted January 25, 2017 Share Posted January 25, 2017 Plenty of people here could write it for you, but instead we're going to help you write it. Are you going to do this using PHP or Javascript? You'll need one or the other because HTML and CSS alone can't do it. But, actually, requiring people to type in their town isn't very nice. If you want to learn how to do this in principle that's one thing, but if you want to put this up with your company's site for real then we should talk about other options. Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/#findComment-1541972 Share on other sites More sharing options...
LouiseS89 Posted January 25, 2017 Author Share Posted January 25, 2017 I'm going to need a lot of help in that case. When I say I know the basics, I mean the bare basics.I don't know the difference between PHP and javascript. I just want to input a HTML code onto my WIX site. Trying to get this set up before tomorrow. I chose for people to input their town, as providing a drop down would be lengthy, boring and consist of around 50+ towns.We're trying to filter out people who have Franchises in their areas, the rest will be redirected to our online store where we post across the nation.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/#findComment-1541974 Share on other sites More sharing options...
requinix Posted January 25, 2017 Share Posted January 25, 2017 What about the people who have a franchise nearby but want to order from the online store? The standard way to approach this problem is to give them to option to find nearby stores. Don't require them to do it at any point as it's more likely to frustrate users. You should give them the online store by default, then make it easy for them to find a nearby store. You can then add support for geolocation which will assist with the latter by automatically determining where the user is - if the user('s browser) allows it. For example, Sainsbury's has a "Store locator" link at the top which takes you to a map where you can find stores automatically (⦿ button) or search for one normally. What do you think? It's more work but I think it's better for the user as it's more consistent with other sites. Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/#findComment-1541977 Share on other sites More sharing options...
LouiseS89 Posted January 25, 2017 Author Share Posted January 25, 2017 It does sound good and I get where you're coming from. We're an evening delivery service and each franchise has it's own facebook page. It's primarily facebook based and orders are taken through there too.The idea is to create a landing page that will get people to the relevant facebook pages (as there are quite a few now). Your way seems simpler. I'd have to check it over with the boss man. Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/#findComment-1541979 Share on other sites More sharing options...
requinix Posted January 26, 2017 Share Posted January 26, 2017 It'd be really nice if your site could take orders for franchises too... Like, if that were possible, then you could allow the online ordering as normal, then when they enter their address you can locate nearby franchises and give the user the option to order from them directly. I feel bad for diverting you from entering a city to using geolocation - it's more complicated than I think you or your boss was expecting. So, Simpler than the geolocating stuff would be to present a map to users showing all your franchises with links to, well, wherever the franchise prefers (like their Facebook page). Using just the IP address you can generally narrow down their location to a city or shire and then automatically put the map at that location, so there's no "site wants to access your location" message from the browser (which, for desktop users, probably wouldn't be much more accurate than with an IP address anyways). I don't know any examples of this off the top of my head, but I know they exist. Again, the idea is that the user can be on your site without any intrusions but can find nearby locations easily enough. Quote Link to comment https://forums.phpfreaks.com/topic/303023-url-redirect-from-form-entry/#findComment-1542014 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.