I'm sure you've all seen something like this before, but I'm just learning PHP, and I decided to do it for fun, and to help me learn.
http://storytime.mine.nu
It's a simple story generator, that uses the words you fill in to create some stories. But what I want to do now is allow users to e-mail those stories to their friends. I've gone thru my PHP book "Visual Quickstart Guide to PHP for the WWW" and copied the code exactly, but it doesn't work. I've been told that it's probably due to an incorrect install or bad permissions of sendmail on my apache, which I am running on 10.2.4.
Also, how can I take the text from the story that is created (ie. the entire story, including title and author), and make it one large string, so that I can make that string the Body of the message that is to be sent.
If someone could help, that would be great. I'm sure this doesn't even make much sense.
By the way, the code to send the e-mail is only on the second story, so select it if you want to see it.
Thanks
Jon
Story Time Generator and SendMail
Moderator: General Moderators
When you actually get your e-mail script working (can't help ya there) then it'd be easy to send the story in the mail. I run an internet game for members and my members need to be able to get their passwords and logins, etc. All you'd have to do would be post the story (exactly as you have on the page after they submit the story) right into the e-mail script and it should send it. This is what I use for my members, hope it helps:
$subject = "Title of your site";
$message = "print the story here again. You can include $vars.";
mail($email, $subject, $message, $extra)
or die("Could not send your e0mail. Contact site administor.");
echo "Mail successfully sent! It should arrive any minute.";
See if this works.
$subject = "Title of your site";
$message = "print the story here again. You can include $vars.";
mail($email, $subject, $message, $extra)
or die("Could not send your e0mail. Contact site administor.");
echo "Mail successfully sent! It should arrive any minute.";
See if this works.