Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Creative Discussion > Programming and Game Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2011, 06:34 PM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 8,309
maximillion is on a distinguished road
Default php question

what i am looking to accomplish:

i have a simple form where a user enters their email and clicks submit..

what i need is 1 php file that sends me an email containing their email address.. it doesn't need to give a thank you message or anything, just clear the box after submitting.

it can have like a popup box saying something like "Thank you, your email address has been submitted."
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...

Last edited by maximillion; 06-28-2011 at 07:11 PM.
Reply With Quote
  #2  
Old 06-28-2011, 07:41 PM
ruletka ruletka is offline
Member
 
Join Date: Aug 2010
Location: WA
Posts: 13
Gender: Female
Credits: 1,665
ruletka
Wink

Code:
<?php 
 $theiremail = $_REQUEST['email']; 
 $to = 'youremail@live.com';
 $fields = array(); 
 $fields{"email"} = "Email"; 
 $body = "\n\n"; foreach($fields as $a => $b){ 	$body .= sprintf("%20s: %

s\n",$b,$_REQUEST[$a]); } 
 
 $headers2 = "From: $theiremail"; 
 $subject2 = "Someone contacted you"; 
 $autoreply = "".$theiremail."";
 
 if($theiremail == '') {print "You have not entered an email, please go 

back and try again";} 
 else { 
 
 $send = mail($to, $subject2, $autoreply, $headers2); 
 if($send) 
 {header( "Location: http://www.site.com/thanks" );} 
 else 
 {print "We encountered an error, please notify 

webmaster@YourCompany.com"; } 
 }
?>
I got the code from http://php.about.com/od/phpapplicati...orm_mail_3.htm and I altered it.

Last edited by ruletka; 06-28-2011 at 07:52 PM.
Reply With Quote
  #3  
Old 06-29-2011, 06:24 AM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 8,309
maximillion is on a distinguished road
Default

cool, i'll have to test it out.. ty :)
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...
Reply With Quote
  #4  
Old 06-29-2011, 11:01 AM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 8,309
maximillion is on a distinguished road
Default

didn't work on zymic hosting.. i'll have to try it on another host later today.
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...
Reply With Quote
  #5  
Old 06-29-2011, 02:40 PM
Nemesis's Avatar
Nemesis Nemesis is offline
Member
 
Join Date: Mar 2011
Location: Ohio, United States
Posts: 641
Gender: Male
Credits: 49,038
Nemesis is on a distinguished road
Default

Quote:
Originally Posted by maximillion View Post
didn't work on zymic hosting.. i'll have to try it on another host later today.
__________________
https://gemnode.com
Free Hosting for Mysidia Adopt Sites
Just join our forum and request your free hosting account
Reply With Quote
  #6  
Old 06-29-2011, 02:56 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,102
Hall of Famer is on a distinguished road
Default

umm Nemisis...

I dont think it makes any differences by switching to a different host, but its just me.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #7  
Old 06-29-2011, 05:46 PM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 8,309
maximillion is on a distinguished road
Default

i don't think script actually works.. and i'm sure it wasn't even tested before being posted... but at least ruletka tried
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...
Reply With Quote
  #8  
Old 06-29-2011, 10:29 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,324
Tequila is on a distinguished road
Default

I found my favorite contact form tutorial though in obscuro, there is one other I like at CSS Tricks (great site that one, another that I really recommend is Girls Who Geek (used to be Tutorialtastic and CodeGrrl)).
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
  #9  
Old 06-30-2011, 09:04 PM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 8,309
maximillion is on a distinguished road
Default

cool.. ty - but ii just wanted a pre-made script ready for use with just the email and submit
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...
Reply With Quote
  #10  
Old 06-30-2011, 09:10 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,324
Tequila is on a distinguished road
Default

The one at CSS Tricks is downloadable, it's just in a neat container. :3 Maybe taking a look at it will make it easier to modify?
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
Reply


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

Forum Jump


All times are GMT -5. The time now is 12:11 PM.

Currently Active Users: 9774 (0 members and 9774 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636