| | |
PHP
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
shouldn't your code be like this:
php Syntax (Toggle Plain Text)
if(isset($_COOKIE['tntcon'])){ // if verification code was correct send the message and show this page mail("you@email.com", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$message, "From: $from"); // delete the cookie so it cannot sent again by refreshing this page setcookie('tntcon','',time()-1800); } else { // if verification code was incorrect then return to contact page and show error header("Location:".$_SERVER['HTTP_REFERER']."?subject=$subject&from=$from&message=$message&wrong_code=true"); exit; }
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
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
•
•
Join Date: Feb 2009
Posts: 58
Reputation:
Solved Threads: 0
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
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
Again you need the following at the top of your page:
And also make sure there is a valid email address in the email function.
php Syntax (Toggle Plain Text)
error_reporting(E_ALL ^ E_NOTICE);
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
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
Are you talking about the email title/subject or webpage titlebar? Below is an example of both cases:
php Syntax (Toggle Plain Text)
mail($1, $title, $3); //mail title 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
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
•
•
Join Date: Feb 2009
Posts: 58
Reputation:
Solved Threads: 0
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?
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?
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
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
•
•
Join Date: Feb 2009
Posts: 58
Reputation:
Solved Threads: 0
php Syntax (Toggle Plain Text)
<?php $body = ""; foreach($_POST as $key => $value) { $body .= "$key : $value \n"; } mail("yourmail.com", "Enquiry", $body, "From: [email]webmaster@yahoo.co.uk[/email]"); ?>
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.
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.
Also if that doesn't work, make sure the following code is in tack on all pages that receive the $_POST.
php Syntax (Toggle Plain Text)
$message="YOUR DETAILS title : ".$_SESSION['html_field_name']." name : ".$_SESSION['html_field_name']." lname : ".$_SESSION['html_field_name']." address : ".$_SESSION['html_field_name']." pin : ".$_SESSION['html_field_name']." country : ".$_SESSION['html_field_name']." contact : ".$_SESSION['html_field_name']." email : ".$_SESSION['html_field_name']." YOUR BUSINESS business : ".$_SESSION['html_field_name']." type : ".$_SESSION['html_field_name']." product : ".$_SESSION['html_field_name']." staff : ".$_SESSION['html_field_name']." checkbox : ".$_SESSION['html_field_name']." checkbox2 : ".$_SESSION['html_field_name']." checkbox3 : ".$_SESSION['html_field_name']." checkbox4 : ".$_SESSION['html_field_name']." checkbox5 : ".$_SESSION['html_field_name']." YOUR WEBSITE radio : ".$_SESSION['html_field_name']." color : ".$_SESSION['html_field_name']." webpage : ".$_SESSION['html_field_name']." hosting : ".$_SESSION['html_field_name']." account : ".$_SESSION['html_field_name']." web1 : ".$_SESSION['html_field_name']." like : ".$_SESSION['html_field_name']." web2 : ".$_SESSION['html_field_name']." like2 : ".$_SESSION['html_field_name']." brand : ".$_SESSION['html_field_name']." images : ".$_SESSION['html_field_name']." text : ".$_SESSION['html_field_name']." 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.
php Syntax (Toggle Plain Text)
foreach($_POST AS $keyzz => $valzz) { $_SESSION[$keyzz]=$valzz; }
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
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
![]() |
Similar Threads
- Project available for PHP Developer (Web Development Job Offers)
- PHP/MySQL Programmer Position (Web Development Job Offers)
- Are you a PHP and Javascript junkie? It's time you met Emma. (Software Development Job Offers)
- PHP MYSQL Developer Position Available (Web Development Job Offers)
- PHP Web Programmer (Post your Resume)
- PHP / My SQL Web developer (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: Contact form
- Next Thread: Pizza ordering system
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple multipletables mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validator variable video web xml youtube






