Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Setting up email - I see the text of the email.php file in my browser #227

Open
github-newbie opened this Issue · 0 comments

1 participant

github-newbie
github-newbie

I downloaded the files at: https://github.com/wojodesign/simplecart-js/tree/email

I was wondering why when I go to the index.html file and click "checkout"

does my browser show me the contents of the email.php file rather than starting up my email client and composing an email.

Do I need to do something like this below which I read elsewhere... where I need to create a file named sendjs.php and put the stuff (below) in it, and then somewhere in the simpleCart.js put a reference to thte sndjsp.php file?

Thanks

<?php
$to = 'you@example.com';
$subject = 'the subject';
$jcitems = $_POST['jcitems'];
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $jcitems, $headers);
Header('Location: thankyou.html');
?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.