Jump to content

Recommended Posts

Hi all

 

I have an email function...please see below...

 

It all works except for one bit... I have used {$_GET['$email']} in the $message line to try and get the email variable from my getEmail Function but the emails that get sent through don't display the email address entered.

 

Can anyone see where I have gone wrong. I'm afraid I'm a bit new to all this php stuff.

 

Many thanks in advance.

 

Mike the newbie

 

code below!!!

 

 

 

function getEmail() {

<?php

if(isset($_GET['inform'])) {

echo "window.location = \"./viewcart.php{$linkStr}\"\n";

} else {

echo "var email = prompt('Please enter your email address:', '');\n";

echo "window.location = \"./viewcart.php{$linkStr}&inform=\" + email\n";

}

 

//email ownerEmail with message saying please keep me informed

 

$message = "Could you please keep me informed about new products and special offers\n\nMy email address is: {$_GET['$email']}\n\n\nPlease be aware: You receive this email more than once per customer";

 

mail('xxxxx@xxxxx.co.uk', '! Please Keep Me Informed -- Email from cart system !', $message);

?>

}

Link to comment
https://forums.phpfreaks.com/topic/2495-help-needed-with-email-function/
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.