email with mysql values

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
acwe88
Forum Newbie
Posts: 24
Joined: Tue Nov 07, 2006 10:47 am

email with mysql values

Post by acwe88 »

Hi there

I have built my first program in php :) but am now stuck

i have a program which sends me an email a month in advance of when my domain names are up for renewal

what i am aiming for:-

email content needs to contain mysql values for 4 different fields in my table

so when i get the email it will show me the domain names which are up for renewal

Is this possible?


Thanks
Alex
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Yes - just stick the content into a string:

Code: Select all

<?php]
$mymessage = "Hello ".$name.", your ".$domain." domain is going to expire on ".$date.".";
mail('me@here.com', 'A Subject', $mymessage);
Post Reply