Jump to content

PHP Email Code


wantabe2

Recommended Posts

The attached code works except the email portion. This code allows a user to upload a file(s) to a network share & has a few check mark boxs for John Doe & Jane Doe. If the box for John or Jane is checked it is suppose to send them an email once submit is pressed but the email does not get sent. Can someone help me out on this? Thanks

17405_.txt

Link to comment
Share on other sites

If I put just this code:

 

<?php
if (isset($_POST['formsent'])) {
  $destination = array();
  if (!empty($_POST['notify_jane'])) $destination[] = jane@yahoo.com;
  if (!empty($_POST['notify_john'])) $destination[] = john@yahoo.com;
  if ($destination) {
    mail(join(', ', $destination), 'Notification', 'Hey there');
  }
} else {
?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
  <input type="hidden" name="formsent" value="true" />
        <br/>Check this box <input autocomplete="off" type="checkbox" name="notify_jane" value="yes" /> to send <strong>John Doe</strong> a notification.
        <br/>Check this box <input autocomplete="off" type="checkbox" name="notify_john" value="yes" /> to send <strong>Jane Doe</strong> a notification.
        <input type="submit" value="Submit" />
        </form>
<?php
}

 

 

I still does not work & I get the URL below in the browser...thanks to any help provided.

 

 

http://myserver/flow/%3C?=$_SERVER['PHP_SELF']?>

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.