Jump to content

mehole

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mehole's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks guys, i'm not getting the error anymore, but it is just showing a blank screen when I hit submit, the e-mail is being sent but it is not going to the page i redirected it to?
  2. Ok, i've changed what you said but i'm still getting the same error: [quote]Parse error: parse error, unexpected $ in /home/content/m/e/h/mehole8338/html/Bookingform/enquiry.php on line 51 [/quote] I dont understand what's wrong?
  3. I am very new to php so go easy if these mistakes are stupid  ;) I've got this script: [code]<?PHP $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $phone = $_POST['phone']; $wmonth = $_POST['month']; $wdate = $_POST['date']; $wyear = $_POST['year']; $umonth = $_POST['month2']; $udate = $_POST['date2']; $uyear = $_POST['year2']; $adults = $_POST['adults']; $child = $_POST['child']; $submit = $_POST['submit']; //enter the email that the form should be sent to $emailTo = 'my@email.com'; //enter the email's subject $emailSubject = "Email subject"; $emailBody = "Name: $fname $lname\n"; "Email: $email\n"; "Phone Number: $phone\n"; "Dates wanted: $wmonth-$wdate-$wyear\n"; "Until: $umonth-$udate-$year"; "Number of Adults: $adults"; "Number of Children: $child"; $emailHeader = "From: $fname $lname; $email\n"; "Reply-To: $fname $lname\n"; "MIME-Version: 1.0\n"; "Content-type: text/plain; charset=\"ISO-8859-1\"\n"; "Content-transfer-encoding: quoted-printable\n"; mail($emailTo, $emailSubject, $emailBody, $emailHeader); if ($_POST['submit']) { if (($fname=="") || ($lname=="")|| ($email=="") || ($wmonth=="") || ($wdate=="") || ($wyear=="") || ($umonth=="") || ($udate=="") || ($uyear=="") || ($adults==""))  { print "Error: Please complete all of the required fields."; outputform(); } else { //URL of where the user is redirected to header("Location: http://www.mysite.com"); exit; } ?>[/code] But i keep getting this error: [quote]Parse error: parse error, unexpected $ in /home/content/m/e/h/mehole8338/html/Bookingform/enquiry.php on line 51[/quote] But all that is on line 51 is [code]?>[/code] so i don't understand what is wrong? Can someone help me out? Many thanks Mike
  4. [quote]Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, support@supportwebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. [/quote] It seems to only happen when I enter multiple email addresses, here is the link, can you see what happens when you try: http://mikesjokepage.com/Untitled-3.html
  5. Ok I have tried using the HTTP_REFERER code but I'm now getting an error and i'm not sure what is wrong? this is my code: [code]<?php $name = $_POST['name']; $http_referrer = $_SERVER['HTTP_REFERER']; $msg = "Hey, it's $name\n"; $msg .= "Check out this funny picture over at Mike's Joke Page\n"; $msg .= "$http_referrer\n"; $msg .= "There's also some funny videos and cool games as well\n"; $msg .= "From $name\n"; $recipient = "{$_POST['email1']};{$_POST['email2']};{$_POST['email3']};{$_POST['email4']}{$_POST['email5']};{$_POST['email6']}"; $subject = "Recommendation From A Friend..."; $mailheaders = "From: {$_POST[myemail]}\r\n"; $mailheaders .= "Reply-To: {$_POST[myemail]}\r\n"; mail($recipient, $subject, $msg, $mailheaders); header("Location: http://www.mikesjokepage.com"); exit; ?>[/code] Can anyone see the problem? Thanks Mike
  6. Hi I have only very recently started learning php so I am VERY VERY new to it and have not done a lot so sorry for my lack of knowledge on the topic. I have a php scipt that allows visitors to send a page of my site to a friend, and I was hoping to use the same script for every page but there are a couple of things I don't know how to do (well there is a lot of things I don't know how to do but this is just for this script  ;) ): Get the URL of the current page so be displayed in the email. I tried using: [code]$URI = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; [/code] But when I open the email it show the url of the actual .php file, not the url of the page that the form is on. I have been told that I need the hard code the page to fix this but im not sure how to? Also I am having trouble sending the e-mail to multiple email addresses, I tried using semi-colons but that didn't work, usless I put the wrong thing in. Can you use the variables separated with a semi-colon or does it have to be actual email addresses? Thank you very much for any help anyone can give me Mike
×
×
  • 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.