
I need a script, submit to database and redirect
- or -
Post a project like this1513
£40(approx. $54)
- Posted:
- Proposals: 3
- Remote
- #3158494
- Awarded
Description
Experience Level: Entry
Estimated project duration: less than 1 week
I'm looking for somebody to write a script for me, preferably in php but open to other ideas.
Basic concept, somebody lands on our homepage and checks availability in their area. Postcode input (max 9 chars) and Submit button. (already done)
Postcode - name/id 'zip'
submit name 'did_submit'
I want the basic script to operate like this:
Postcode input form (max 9 chars) - submit
-Convert to uppercase and remove spaces
-Store within database
If
First 4 chars =“AA11,AA12,AA13” then redirect to ‘URL’
Else if
First 3 chars =“B10,B11,B13” Then redirect to ‘URL’
Else if
First 2 Chars =“B1,C1,D2,E3” Then redirect to ‘URL’
Else If
input =“LOCATION, LOCATIOM,NIOACOL” Then reforest to ‘URL’
Else
Redirect to ‘URL’
I think this is the best way to do it, post-codes may fall into 2 IF statements:
Eg, Postcode A31 will fit into A31 and A3,
In this scenario they would both go to the same page anyway, but I don't want to end up in a loop etc, it should make the first valid redirection.
I'm happy to update the code to a full list of post-codes, I will provide a demo list of inputs and the original form for the selected coder.
I would also like to add, the is no validation on the input, but I would like some advice on how to protect it for attacks (injection etc)
Ideally I would like this done this week, Only requirements for the coder are they must be able to communicate clearly in English.
Basic concept, somebody lands on our homepage and checks availability in their area. Postcode input (max 9 chars) and Submit button. (already done)
Postcode - name/id 'zip'
submit name 'did_submit'
I want the basic script to operate like this:
Postcode input form (max 9 chars) - submit
-Convert to uppercase and remove spaces
-Store within database
If
First 4 chars =“AA11,AA12,AA13” then redirect to ‘URL’
Else if
First 3 chars =“B10,B11,B13” Then redirect to ‘URL’
Else if
First 2 Chars =“B1,C1,D2,E3” Then redirect to ‘URL’
Else If
input =“LOCATION, LOCATIOM,NIOACOL” Then reforest to ‘URL’
Else
Redirect to ‘URL’
I think this is the best way to do it, post-codes may fall into 2 IF statements:
Eg, Postcode A31 will fit into A31 and A3,
In this scenario they would both go to the same page anyway, but I don't want to end up in a loop etc, it should make the first valid redirection.
I'm happy to update the code to a full list of post-codes, I will provide a demo list of inputs and the original form for the selected coder.
I would also like to add, the is no validation on the input, but I would like some advice on how to protect it for attacks (injection etc)
Ideally I would like this done this week, Only requirements for the coder are they must be able to communicate clearly in English.

Scott R.
100% (3)Projects Completed
6
Freelancers worked with
6
Projects awarded
25%
Last project
22 Sep 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies