Jump to content

Some help for a newbie please - just some pointers to get started.


budfox

Recommended Posts

Hello everyone.

 

I'm a bit of a PHP newbie I'm afraid. My experience is limited to slightly modifying existing code, such as in Joomla, to make small changes.

I have no real idea how to write a piece of code from scratch and unfortunately, I need to.

 

For my own satisfaction, I'd rather do it myself, learning as I go, with just a few pointers to get things started. I need to do the following:

 

On my page (which happens to be a Zen Cart store) I need a box where someone types their UK postcode. I'm going to simplify the next bit so that my explanation is easier.

 

Once the script has got the postcode, it checks against a list of postcodes that we deliver to, and then either prints: 'yes we deliver to your area' if it finds a match. If not is says 'sorry, we don't deliver'

 

So in summary this is what happens:

 

User inputs postcode and hits a 'check' button.

PHP checks to see if the postcode is on the list.

If it is, we get a 'yes' message.

If it isn't, we get a 'no' message.

 

I don't want the page to reload, just the answer to appear underneath the input box. In reality, there are three delivery zones, and I want 'yes we deliver and it will cost £x.xx to deliver to your area' but I'll work that out.

 

Thanks for any help

 

Steve

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.