Jump to content

Sending email based on user requirements


simonjk

Recommended Posts

Hi,

 

I have a mysql table 'Users' of people who state which town they would like a weather forecast for.

 

I then have a second table 'Locations' which contains town names and all the coordinates for that location.

 

I then want to be able to send a user an email with a forecast for their selected town on running a PHO script.

 

However, can someone help me with how I match up the 'Users' selected town, with the same town in the 'Location's table so that I can send an email of the forecast for their selected town?

 

Seem to be going around in circles with this one.

 

With thanks

Simon

 

 

 

Link to comment
Share on other sites

Please don't follow Wicked's advice. At least not the way he wrote it.

 

You do need the locations table, but you also need a foreign key field in the users table linking these two up with each other. There are a lot of tutorials on how to accomplish this, if you're not already familiar with foreign key references.

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.