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

 

 

 

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.