Jump to content

graeme_1988

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

graeme_1988's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I don't suppose anyone has spotted where I have been going wrong? Feel bad for keep asking but it's pushing my sanity to the limit haha
  2. 2 posts and both contain a link to your website, trying to boost your low PageRank website through this high-volume forum? Haha there's always one that tries it
  3. Yeah the 'after' part was something I had commented in - I tried to remove all comments when I pasted it on here, so sorry about that! The 'from subject' part worked fine before - it just meant that when someone sends the form, and the client receives the email, it says it is from 'Website User Capture Page etc'.
  4. I managed to get it to work, so that the value of the checkbox determines the page the user will come to. However, now the email doesn't get sent. I'm assuming it is because I am declaring variables twice, or perhaps it is because the message send part of the code is repeated, but I've tried a few different ways and it still doesn't work. I have pasted my code below (I imagine some of the more experienced PHP experts out there will have a fit when they see how poor/messy it is!). Any help would be much appreciated! <?php $YourEmail = "[email protected]"; $WebsiteURL = " ####.html"; $subject = "Subject"; if (empty ($_POST['agree'])) { if(!isset($_POST['email'])) { header("location: $WebsiteURL"); exit(); } $_POST['name'] = preg_replace("/[\n\r]+/", "", $_POST['name']); $_POST['email'] = preg_replace("/[\n\r]+/", "", $_POST['email']); ## THE EMAIL TEXT $text = " ----------------------------------------------------------------------------- Title Text ----------------------------------------------------------------------------- Name: ".$_POST['name']." \n\n Email: ".$_POST['email']." \n\n Past Experience: ".$_POST['exp']." \n\n Area: ".$_POST['area']." \n\n Contact Number: ".$_POST['phone']." \n\n Referral: ".$_POST['referral']." \n\n "; $subject = stripslashes($subject); $text = stripslashes($text); @mail("$YourEmail", $subject, $text, "From: <$subject>"); After header("Location: ####.html"); exit; } else { if(!isset($_POST['email'])) { header("location: $WebsiteURL"); exit(); } $_POST['name'] = preg_replace("/[\n\r]+/", "", $_POST['name']); $_POST['email'] = preg_replace("/[\n\r]+/", "", $_POST['email']); ## THE EMAIL TEXT $text = " ----------------------------------------------------------------------------- Title text ----------------------------------------------------------------------------- Name: ".$_POST['name']." \n\n Email: ".$_POST['email']." \n\n Past Experience: ".$_POST['exp']." \n\n Area: ".$_POST['area']." \n\n Contact Number: ".$_POST['phone']." \n\n Referral: ".$_POST['referral']." \n\n "; $subject = stripslashes($subject); $text = stripslashes($text); @mail("$YourEmail", $subject, $text, "From: <$subject>"); After header("Location: ####.html"); exit; } ?> Just to reiterate - the user will enter their details on a form, then click submit. The data then gets emailed to the client. If they check the checkbox, they will then get sent to "page a", if they leave it blank, then they get sent to "page b". Cheers! Graeme
  5. Thanks for that - managed to get it working!
  6. Hi, I rarely deal with PHP, so this may sound very easy, but I am struggling to figure out what to do. Basically I have created a website for a client that allows for customers to pay for certain packages using Paypal. They select the package they want, which then takes them to a data input page (email, tel no, name etc). Once they click submit, that information gets emailed to my client, and the customer is presented with the relevant Paypal page. What I need is on each data input page, for a checkbox to be available, so if the customer checks the checkbox, they get taken to a different paypal page rather than if they leave it blank. So really, what I need is if the checkbox is left blank and that page is submitted, the customer goes to Page A. If the checkbox is checked and they click submit, the customer goes to Page B. Any help would be greatly appreciated! Cheers Graeme
×
×
  • 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.