PHP

Reply

Join Date: Feb 2009
Posts: 58
Reputation: rohnni is an unknown quantity at this point 
Solved Threads: 0
rohnni rohnni is offline Offline
Junior Poster in Training

Re: PHP

 
0
  #41
Feb 28th, 2009
i post my code , can u check it..
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,479
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: PHP

 
0
  #42
Feb 28th, 2009
shouldn't your code be like this:
  1. if(isset($_COOKIE['tntcon'])){
  2. // if verification code was correct send the message and show this page
  3. mail("you@email.com", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from");
  4. // delete the cookie so it cannot sent again by refreshing this page
  5. setcookie('tntcon','',time()-1800);
  6. } else {
  7. // if verification code was incorrect then return to contact page and show error
  8. header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true");
  9. exit;
  10. }
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 58
Reputation: rohnni is an unknown quantity at this point 
Solved Threads: 0
rohnni rohnni is offline Offline
Junior Poster in Training

Re: PHP

 
0
  #43
Feb 28th, 2009
Notice: Undefined variable: subject in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16

Notice: Undefined variable: message in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16

Notice: Undefined variable: from in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16

Warning: mail() [function.mail]: SMTP server response: 554 <you@email.com>: Recipient address rejected: Relay access denied in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 16

Notice: Undefined variable: subject in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20

Notice: Undefined variable: message in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20

Notice: Undefined variable: from in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20

Warning: mail() [function.mail]: SMTP server response: 554 <you@email.com>: Recipient address rejected: Relay access denied in E:\domains\h\highweb.co.uk\user\htdocs\geeta\assignments\php\requirements-form\mail.php on line 20
Thanks - Email Send - Done
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,479
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: PHP

 
0
  #44
Feb 28th, 2009
Again you need the following at the top of your page:
  1. error_reporting(E_ALL ^ E_NOTICE);
And also make sure there is a valid email address in the email function.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 58
Reputation: rohnni is an unknown quantity at this point 
Solved Threads: 0
rohnni rohnni is offline Offline
Junior Poster in Training

Re: PHP

 
0
  #45
Mar 1st, 2009
hi...
can anyone tell me how to print title on every page.. i want to recieve a title of everypage but only in email that titile only will display on my email that i will get not anywhere else....
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,479
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: PHP

 
0
  #46
Mar 1st, 2009
Are you talking about the email title/subject or webpage titlebar? Below is an example of both cases:
  1. mail($1, $title, $3); //mail title
  2. echo "<head><title>$title</title></head>";//html title bar
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 58
Reputation: rohnni is an unknown quantity at this point 
Solved Threads: 0
rohnni rohnni is offline Offline
Junior Poster in Training

Re: PHP

 
0
  #47
Mar 1st, 2009
u know i m using 5 html forms so i want when i will get the output of 5 pages on my email how can i identify which ifromation is realted to which form thats y i need to display a title that will breakup the pages like :-
YOUR DETAILS(title)

title : MR
name :
lname :
address : LONDON
pin :
country : UK
contact :
email :


YOUR BUSINESS(title)

business :
type :
product :
staff : UJFYHDD
checkbox : a
checkbox2 :
checkbox3 : c
checkbox4 :
checkbox5 : e

YOUR WEBSITE(title)

radio : 1
color : 1
webpage : NA
hosting : 1
account :
web1 : HTTP://WWW.YAHOO.COM
like :
web2 : HTTP://WWW.YAHOO.COM

like2 :
brand : 1
images : 1
text : 1

lang : 0

want to display like above..any idea?
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,479
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: PHP

 
0
  #48
Mar 1st, 2009
Simply add them manually (script wise) to the $message variable. If you like, you can post what you have assigned to the $message variable and I shall correct it to the above design for you!
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 58
Reputation: rohnni is an unknown quantity at this point 
Solved Threads: 0
rohnni rohnni is offline Offline
Junior Poster in Training

Re: PHP

 
0
  #49
Mar 1st, 2009
  1. <?php
  2. $body = "";
  3. foreach($_POST as $key => $value) {
  4. $body .= "$key : $value \n";
  5. }
  6. mail("yourmail.com", "Enquiry", $body, "From: [email]webmaster@yahoo.co.uk[/email]");
  7.  
  8.  
  9. ?>
Thanks - Email Send - Done

this is my final script that get information from all 5 html forms
where i put $mesaage?
Last edited by peter_budo; Mar 1st, 2009 at 6:48 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,479
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: PHP

 
0
  #50
Mar 1st, 2009
below is a way of assigning each value to the variable but replace the term html_field_name with the name of the html field.
  1. $message="YOUR DETAILS
  2.  
  3. title : ".$_SESSION['html_field_name']."
  4. name : ".$_SESSION['html_field_name']."
  5. lname : ".$_SESSION['html_field_name']."
  6. address : ".$_SESSION['html_field_name']."
  7. pin : ".$_SESSION['html_field_name']."
  8. country : ".$_SESSION['html_field_name']."
  9. contact : ".$_SESSION['html_field_name']."
  10. email : ".$_SESSION['html_field_name']."
  11.  
  12.  
  13. YOUR BUSINESS
  14.  
  15. business : ".$_SESSION['html_field_name']."
  16. type : ".$_SESSION['html_field_name']."
  17. product : ".$_SESSION['html_field_name']."
  18. staff : ".$_SESSION['html_field_name']."
  19. checkbox : ".$_SESSION['html_field_name']."
  20. checkbox2 : ".$_SESSION['html_field_name']."
  21. checkbox3 : ".$_SESSION['html_field_name']."
  22. checkbox4 : ".$_SESSION['html_field_name']."
  23. checkbox5 : ".$_SESSION['html_field_name']."
  24.  
  25. YOUR WEBSITE
  26.  
  27. radio : ".$_SESSION['html_field_name']."
  28. color : ".$_SESSION['html_field_name']."
  29. webpage : ".$_SESSION['html_field_name']."
  30. hosting : ".$_SESSION['html_field_name']."
  31. account : ".$_SESSION['html_field_name']."
  32. web1 : ".$_SESSION['html_field_name']."
  33. like : ".$_SESSION['html_field_name']."
  34. web2 : ".$_SESSION['html_field_name']."
  35.  
  36. like2 : ".$_SESSION['html_field_name']."
  37. brand : ".$_SESSION['html_field_name']."
  38. images : ".$_SESSION['html_field_name']."
  39. text : ".$_SESSION['html_field_name']."
  40.  
  41. lang : ".$_SESSION['html_field_name'];

Also if that doesn't work, make sure the following code is in tack on all pages that receive the $_POST.
  1. foreach($_POST AS $keyzz => $valzz) {
  2. $_SESSION[$keyzz]=$valzz;
  3. }
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC