php email and mysql issue
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php email and mysql issue
Sending email can be a problem. Is there an SMTP or other program running on your server to deliver mail? Is PHP configured correctly for sending mail? Do you have a simple test script that sends an email to eliminate the chance that the problem is elsewhere?
(#10850)
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: php email and mysql issue
So how are they different? And does the test email script still work?
(#10850)
Re: php email and mysql issue
Is visitor_mot a DATE field? If it's DATETIME, you'll need to wrap it in DATE first.
Also, you really don't want to be using SELECT *, but that's a whole other discussion.
Code: Select all
SELECT * FROM visitors WHERE DATE(visitor_mot) = DATE_ADD(CURDATE(), INTERVAL 1 DAY)Re: php email and mysql issue
You could even use date() + strtotime();
Code: Select all
date('Y-m-d', strtotime('2015-06-20'));Re: php email and mysql issue
You mean just append it to $message? Just use the concatenation operator.
Code: Select all
$message = "Some stuff here";
$message .= "And more stuff here";