Jump to content


Help needed with email function...

  • Please log in to reply
1 reply to this topic

#1 borris_uk

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 11 September 2005 - 04:21 PM

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() {
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);

#2 Mattyspatty

  • Members
  • PipPipPip
  • Advanced Member
  • 76 posts
  • LocationEngland :D

Posted 15 September 2005 - 09:41 AM

you cant get a variable $email, unless you assign $email to a value.
ok, so my PHP is a bit rusty... my replies are 90% ok.
the other 10% either have syntax errors or are the "hard solution"
http://www.php.net  http://www.google.com - Are your friends!

I have a C++ problem with 'keybd_event' in certain applications. if you can help me PM me! :P
Needs motivation to create another quick cash website. I need a new TV

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users