•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 428,633 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,946 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1330 | Replies: 3
![]() |
•
•
Join Date: Dec 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi,
i am very new to php so please forgive me if i sound stupid.i have a tell friend php code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>iTell from urQuiz</title>
<style type="text/css">
<!--
.style2 {font-size: 12px}
-->
</style>
</head>
<body>
<form action="<? echo $_POST['self']; ?>" method="post"> Your Name : <br />
<input name="name" type="text"><br />Friend's Email Address : <br />
<input name="email" type="text"><br />
<input name="Send" type="submit" value="Send">
</form>
<?
if (@$_POST['Send']=="Send")
{
$name=$_POST['name'];
$email=$_POST['email'];
$subject = $name. " wants you to visit this site, its cool!";
//This is the body section of the email and can be substituted for your message
$message= "Hi, \n\n" .$name. " thinks you might like to visit our website : \n\n http://www.yourdomain.co.uk \n\n\n\n\n\n\n\nNote: This message was not sent unsolicited. It was sent through a form located at http://www.yourdomain.co.uk If you believe this message was received on error, please disregard it.";
$headers = 'From: webmaster@yourdomain.co.uk' . "\r\n" . 'Reply-To: webmaster@yourdomain.co.uk' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
echo "You`ve recommended our site to: $email Thanks you";
}
?>
<br />
<br />
</body>
</html>
i am running this code on windows >apache server and php 5.
but i cant seem to get it to work.could anybody please help me out and suggest how i could get this script to work on windows ..do i need to change anything in the code or do i need to download any other software..please help
i am very new to php so please forgive me if i sound stupid.i have a tell friend php code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>iTell from urQuiz</title>
<style type="text/css">
<!--
.style2 {font-size: 12px}
-->
</style>
</head>
<body>
<form action="<? echo $_POST['self']; ?>" method="post"> Your Name : <br />
<input name="name" type="text"><br />Friend's Email Address : <br />
<input name="email" type="text"><br />
<input name="Send" type="submit" value="Send">
</form>
<?
if (@$_POST['Send']=="Send")
{
$name=$_POST['name'];
$email=$_POST['email'];
$subject = $name. " wants you to visit this site, its cool!";
//This is the body section of the email and can be substituted for your message
$message= "Hi, \n\n" .$name. " thinks you might like to visit our website : \n\n http://www.yourdomain.co.uk \n\n\n\n\n\n\n\nNote: This message was not sent unsolicited. It was sent through a form located at http://www.yourdomain.co.uk If you believe this message was received on error, please disregard it.";
$headers = 'From: webmaster@yourdomain.co.uk' . "\r\n" . 'Reply-To: webmaster@yourdomain.co.uk' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
echo "You`ve recommended our site to: $email Thanks you";
}
?>
<br />
<br />
</body>
</html>
i am running this code on windows >apache server and php 5.
but i cant seem to get it to work.could anybody please help me out and suggest how i could get this script to work on windows ..do i need to change anything in the code or do i need to download any other software..please help
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Umm..sometimes mails sent by php is considered as spam(because of the unknown domain). If that isn't the problem, check your smtp and smtp_port in php.ini.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
antivirus apple browser choose computer crack daniweb debian defender dell development download explorer fiji hoax install internet leopard linux mail media microsoft mobile news office open operating os photo php pirate research security server software source spyware survey system torvalds tweaks ubuntu unix upgrade vista web windows windows update windows vista xp
- Email (Secrect Msg) (PHP)
- PHP Mail Error (PHP)
- Php ini setting--mail function (PHP)
- PHP mail function issue (PHP)
- Problems with PHP mail function. (PHP)
- do u advice me to do my online store using ASP or PHP (IT Technologies and Trends)
- question about connecting odbc to sql through php script (PHP)
- Do you need AV and Firewall? (Windows NT / 2000 / XP / 2003)
- This ought to be simple - extra spaces (PHP)
Other Threads in the PHP Forum
- Previous Thread: Help! I need an interactive calendar
- Next Thread: Counting requests.



Linear Mode