Computer ForumsComputers  

Go Back   Computer Forums > The World Wide Web > Web Graphics, design, digital images

Reply
 
LinkBack Thread Tools Display Modes
Old 07-07-2007, 08:29 AM   #1 (permalink)
Ultra Techie
 
jay_bo's Avatar
 
Join Date: Jul 2006
Posts: 878
Exclamation php

i want a forum on my site which emails to my address OFF the SITE i DONT want it to open up ther default email program thanks
jay_bo is offline   Reply With Quote
Old 07-07-2007, 05:03 PM   #2 (permalink)
Newb Techie
 
mademokid's Avatar
 
Join Date: Jun 2007
Posts: 28
Default Re: php

Do you have php and sendmail on your webserver?
mademokid is offline   Reply With Quote
Old 07-07-2007, 06:29 PM   #3 (permalink)
Banned
 
Join Date: Oct 2006
Posts: 82
Default Re: php

Try this simple form. There are a butt load of them available.

1. First you need to create a form to use the PHPmail script. A form will look something like the one below.
It must be saved as an htm or html file. You can edit the one below to suit your own needs.


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Us</title>
<link rel="stylesheet" type="text/css" href="../../css/nms.css" />
</head>
<body>
<form method="post" action="mail.php">
<table>
<tr>
<td>What is your name ?</td>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td>What is your e-mail address ?</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td> Comments:</td>
<td><textarea name="data" cols=40 rows=6></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" /></td>
</tr>
</table>
</form>
</body>
</html>




2. Next you need to create a file named mail.php which will contain the following code.


<?
$to = 'me@mydomain.com';
$subject = 'subject';
$message = 'From: ' . $_REQUEST['name'] . "\n\n" . $_REQUEST['data'];
$email = $_REQUEST['email'];
$headers = 'From: ' . $email . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail ($to, $subject, $message, $headers);
header("Location: thanks.html");
?>



Note: You will replace 'me@mydomain.com' with your e-mail account and 'subject' with what
will be in the subject field of the e-mail. Replace "thanks.html" with the name of the page that the
viewer will be redirected to after submitting the form.


3. Upload both files into your webspace. Make sure to set the correct permission for the PHP file.

Further reading: PHP Mail

Cheers,
Williwaw

williwaw is offline   Reply With Quote
Old 07-08-2007, 06:21 AM   #4 (permalink)
Ultra Techie
 
jay_bo's Avatar
 
Join Date: Jul 2006
Posts: 878
Default Re: php

didnt quite get step 3

3. Upload both files into your webspace. Make sure to set the correct permission for the PHP file.


could you just describe it abit more and thanks for this, it is excellent please could you check this out and give me your thoughts if this would work or not website
jay_bo is offline   Reply With Quote
Old 07-08-2007, 09:15 AM   #5 (permalink)
Newb Techie
 
mademokid's Avatar
 
Join Date: Jun 2007
Posts: 28
Default Re: php

Do you have a hosting company or a web address yet?
mademokid is offline   Reply With Quote
Old 07-08-2007, 11:18 AM   #6 (permalink)
Ultra Techie
 
jay_bo's Avatar
 
Join Date: Jul 2006
Posts: 878
Default Re: php

no not yet i have been testing my scripts out on easy php

im not sure on what he means by this "Make sure to set the correct permission for the PHP file"
jay_bo is offline   Reply With Quote
Old 07-08-2007, 12:27 PM   #7 (permalink)
Banned
 
Join Date: Oct 2006
Posts: 82
Default Re: php

This will not work for you then. You must have FTP access to the/your server for this to work.

To answer your other question:
Use permissions to define who can and cannot view files or folders, who can and cannot run files, and who can and cannot change files or folders on a server.

Cheers,
Williwaw
williwaw is offline   Reply With Quote
Old 07-09-2007, 06:14 AM   #8 (permalink)
Ultra Techie
 
jay_bo's Avatar
 
Join Date: Jul 2006
Posts: 878
Default Re: php

oryt okay i get ya. yea wel im designing a web site for a hotel so i will have one soon
jay_bo is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Site Project - Flash + PHP + MySQL + CSS theone_trent Web Graphics, design, digital images 2 06-30-2007 12:12 PM
Need a good captcha generating php script surut Windows Operating Systems and Software 1 05-26-2007 08:23 AM
PHP captcha script needed iorgus Programming Discussions 2 05-20-2007 12:33 PM
PHP 2-player game? thejeremy Programming Discussions 4 04-09-2007 05:01 PM
Remote file access w/ IP + PHP? thejeremy Programming Discussions 2 04-04-2007 04:24 PM


All times are GMT -5. The time now is 04:15 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0