Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Contact problem


Goto page 1, 2  Next
 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> HTML Forum
View previous topic :: View next topic  
Author Message
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Wed Sep 21, 2005 3:41 pm    Post subject: Contact problem Reply with quote

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!" />
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Wed Sep 21, 2005 5:23 pm    Post subject: Re: Contact problem Reply with quote

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. Smile

Have a read of this - obviously you'll have to change a few things, but you get the idea.. I hope.
Back to top
View user's profile Send private message Visit poster's website
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Wed Sep 21, 2005 9:01 pm    Post subject: Re: Contact problem Reply with quote


 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 ?>

Back to top
View user's profile Send private message Send e-mail MSN Messenger
webmaster
Site Admin


Joined: 17 Aug 2004
Posts: 3620
Location: Sweden

PostPosted: Wed Sep 21, 2005 9:52 pm    Post subject: Re: Contact problem Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Wed Sep 21, 2005 10:17 pm    Post subject: Re: Contact problem Reply with quote

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!
Back to top
View user's profile Send private message Visit poster's website
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Wed Sep 21, 2005 10:20 pm    Post subject: Re: Contact problem Reply with quote

That never worked Sad It's just for emailing links to me so I can upload renders onto a website should I just use a mailto: ?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Wed Sep 21, 2005 10:30 pm    Post subject: Re: Contact problem Reply with quote

which one didn't work? The both of them should...
Back to top
View user's profile Send private message Visit poster's website
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Wed Sep 21, 2005 10:41 pm    Post subject: Re: Contact problem Reply with quote

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?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Wed Sep 21, 2005 10:47 pm    Post subject: Re: Contact problem Reply with quote

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:&nbsp;&nbsp; <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";
 } ?> &nbsp;</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 Wink
Back to top
View user's profile Send private message Visit poster's website
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Thu Sep 22, 2005 9:10 am    Post subject: Re: Contact problem Reply with quote

You can't do that with freewebs so I just used a normal mailto: I may try it if I .com the website.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
dafunkymunky
100+ Club


Joined: 08 Apr 2005
Posts: 180
Location: India

PostPosted: Thu Sep 22, 2005 9:12 am    Post subject: Re: Contact problem Reply with quote

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.
Back to top
View user's profile Send private message
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Thu Sep 22, 2005 10:09 am    Post subject: Re: Contact problem Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Ash
1000+ Club


Joined: 03 Aug 2005
Posts: 1016
Location: England

PostPosted: Thu Sep 22, 2005 11:26 am    Post subject: Re: Contact problem Reply with quote

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 Confused I will search google for php hosts
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Protege
50+ Club


Joined: 19 Sep 2005
Posts: 68
Location: Scotland

PostPosted: Thu Sep 22, 2005 3:32 pm    Post subject: Re: Contact problem Reply with quote

Click
Back to top
View user's profile Send private message Visit poster's website
Phate
500+ Club


Joined: 21 Nov 2004
Posts: 818
Location: 127.0.0.1

PostPosted: Thu Sep 22, 2005 4:44 pm    Post subject: Re: Contact problem Reply with quote

<laff>

Glad to see that people are actually going to my site...
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> HTML Forum All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap