|
Your time now: Mon Nov 23, 2009 12:51 pm
|
View unanswered posts | View active topics
| Author |
Message |
|
Ash
|
Post subject: Contact problem Posted: Wed Sep 21, 2005 3:41 pm |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
I borrowed this code from Phate's website I hope you don't mind if you doi'll just delete it. But How do I make it so I get the email instead of him?
Code: <form method="post"> Your Email: <br><input type="text" name="email" size="20" /><br /> <P>
Subject: <br><input type="text" name="subject" size="20" /><br /> <P> Message: <br><textarea rows=5 cols=30 name="message"></textarea><br /> <input type="submit" name="submit" value="Contact Me!" />
_________________
|
|
| Top |
|
 |
|
Protege
|
Post subject: Re: Contact problem Posted: Wed Sep 21, 2005 5:23 pm |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
Ash wrote: I borrowed this code from Phate's website I hope you don't mind if you doi'll just delete it. But How do I make it so I get the email instead of him?
You made me laugh with that. Thanks.
Have a read of this - obviously you'll have to change a few things, but you get the idea.. I hope.
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Ash
|
Post subject: Posted: Wed Sep 21, 2005 9:01 pm |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
|
Ok I don't have a clue about php where do I edit?
[php]<?php
if(isset($_POST['submit'])) {
$to = "your@email.com";
$subject = "Registration to newsletter";
$message = $_POST['email'];
mail($to, $subject, $message);
echo "You are now registered to the newsletter!";
} else { ?>
<form method="post">
Your e-mail address: <input type="text" name="email" />
<input type="submit" name="submit" value="send the mail" />
<?php } ?>[/php]
_________________
|
|
| Top |
|
 |
|
webmaster
|
Post subject: Posted: Wed Sep 21, 2005 9:52 pm |
|
 |
| Site Admin |
 |
Joined: Tue Aug 17, 2004 2:07 pm Posts: 2554 Location: Sweden
|
Change: your@email.com to your own e-mail
Change: Code: <input type="text" name="email" /> To: Code: <textarea name="email"></textarea>
And it should work fine.
_________________ Make sure to check out our TNX Review and Link Vault Review
|
|
| Top |
|
 |
|
Protege
|
Post subject: Posted: Wed Sep 21, 2005 10:17 pm |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
or you could use this:
Code: <form action="<?=$PHP_SELF?>" method="post"> Your Email: <input type="text" name="email" size="20" /><br /> Subject: <input type="text" name="subject" size="20" /><br /> Message: <textarea rows=5 cols=30 name="message"></textarea><br /> <input type="submit" name="submit" value="Contact Me!" />
<?
if(isset($_POST['submit'])) {
$email = $_POST['email'];
$to = "your@email.com"; $subject = $_POST['subject']; $message = str_replace(array("\\","Content-Type:","bcc:","cc:","MIME-Version:", "Content-Transfer-Encoding:","%"),"",$_POST['message']); mail($to, $subject, $message, "From: $email\n"); echo "Thanks"; }
?>
Save that in the same php page or rename the forms action to a page with the php on it. Wallah!
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Ash
|
Post subject: Posted: Wed Sep 21, 2005 10:20 pm |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
That never worked  It's just for emailing links to me so I can upload renders onto a website should I just use a mailto: ?
_________________
|
|
| Top |
|
 |
|
Protege
|
Post subject: Posted: Wed Sep 21, 2005 10:30 pm |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
|
which one didn't work? The both of them should...
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Ash
|
Post subject: Posted: Wed Sep 21, 2005 10:41 pm |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
Ok Razz's one never worked as it gave me loads of text I never wanted and when I used yours I ended up with this. I hate freewebs.
http://www.freewebs.com/corrosiongfx/Request.htm
Is there anyother way I could try it out like a different web host?
_________________
|
|
| Top |
|
 |
|
Protege
|
Post subject: Posted: Wed Sep 21, 2005 10:47 pm |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
Firstly, when I had a look at your source code, you've forgot the end php tag
Code: <!-- Content --><br><br> <img src="images/hr_top.gif" width="528" height="58" border="0">
<blockquote><font face="Arial" size="2" color="#000000"><strong> <H3>This form is inoperational!</H3> <Provisional users can't create forms action="<?=$PHP_SELF?>" method="post"> Your Email: <input type="text" name="email" size="20" /><br /> Subject: <input type="text" name="subject" size="20" /><br />
Message: <textarea rows=5 cols=30 name="message"></textarea><br /> <input type="submit" name="submit" value="Contact Me!" />
<?
if(isset($_POST['submit'])) {
$email = $_POST['email'];
$to = "your@email.com"; $subject = $_POST['subject']; $message = str_replace(array("\\","Content-Type:","bcc:","cc:","MIME-Version:", "Content-Transfer-Encoding:","%"),"",$_POST['message']); mail($to, $subject, $message, "From: $email\n"); echo "Thanks"; } ?> </strong></font></blockquote> <br><br><br><br><br><br>
<img src="images/hr_bot.gif" width="528" height="44" border="0"> <!-- Content -->
..And you can't run PHP on a html page..rename it to request.php 
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Ash
|
Post subject: Posted: Thu Sep 22, 2005 9:10 am |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
|
You can't do that with freewebs so I just used a normal mailto: I may try it if I .com the website.
_________________
|
|
| Top |
|
 |
|
dafunkymunky
|
Post subject: Posted: Thu Sep 22, 2005 9:12 am |
|
 |
| 100+ Club |
 |
Joined: Fri Apr 08, 2005 8:32 am Posts: 182 Location: India
|
well even if he does rename it ...does freewebs support php hosting.....???
i think this one site provides free php hosting
www.100webspace.com....
if freewebs does then its well and good..but one prob is that you cannot upload more than 50 files unless you are a premium user.
_________________ --------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....
|
|
| Top |
|
 |
|
Protege
|
Post subject: Posted: Thu Sep 22, 2005 10:09 am |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
You can if you put them in different folders. Noticed that when I uploaded a forum on a site ages ago. I've not used Freewebs in a long time though..
EDIT: Just had a look on freewebs and it looks like free accounts don't get to use PHP. Bah!
Quote: Does FreeWebs support PHP? Unfortunately at this time FreeWebs does not support PHP and you cannot run these scripts from your FreeWebs site.
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Ash
|
Post subject: Posted: Thu Sep 22, 2005 11:26 am |
|
 |
| 1000+ Club |
 |
Joined: Wed Aug 03, 2005 7:10 pm Posts: 1019 Location: England
|
dafunkymunky wrote: well even if he does rename it ...does freewebs support php hosting.....??? i think this one site provides free php hosting www.100webspace.com.... if freewebs does then its well and good..but one prob is that you cannot upload more than 50 files unless you are a premium user.
According to my browser that site does not excist  I will search google for php hosts
_________________
|
|
| Top |
|
 |
|
Protege
|
Post subject: Posted: Thu Sep 22, 2005 3:32 pm |
|
 |
| 50+ Club |
Joined: Mon Sep 19, 2005 9:05 am Posts: 67 Location: Scotland
|
_________________ Docendo discimus.
|
|
| Top |
|
 |
|
Phate
|
Post subject: Posted: Thu Sep 22, 2005 4:44 pm |
|
 |
| 500+ Club |
 |
Joined: Sun Nov 21, 2004 5:12 am Posts: 826 Location: 127.0.0.1
|
|
<laff>
Glad to see that people are actually going to my site...
_________________ Web-Developing since '03
|
|
| Top |
|
 |
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
|