![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2005
Posts: 1
OS: WinXP
|
sending info help
i have a site layed out with two text boxes where people can write whatever the feel like writing.
i want to have whatever they typed into both boxes emailed to me when they press the "submit" button on the page. can anyone tell me how i could go about doing this? thanks.. -madalive8 |
|
|
|
|
|
#2 (permalink) |
|
Analyst, Security Team
Join Date: Nov 2005
Location: UK
Posts: 1,968
OS: xp
|
You could use php scripting,if you have a form something like this
Code:
<form method = post action = send_mail.php><br> your email address:<br> <input type = text name = from size = 38><br> subject:<br> <input type = text name = title size = 38><br> your message:<br> <textarea name = body cols = 30 rows = 10></textarea><br> <input type = submit value = "Send"></form> then the send_mail.php file which would look something like Code:
<?
$to_email = "your email address";
$content = $body // for extra textareas $content = $body + $body2 + $body3..........
{
mail($to_email,$title,$content,"From: $from\n");
}
?>
NB this code is just an example of how mail would be sent using the submit button on the form, it doesn't encrypt the message. Validating user's and/or user input is another point to consider. |
|
|
|
|
|
#4 (permalink) | |
|
Cymru am byth
|
Quote:
PHP Code:
Then the names become part of the POST variables. If you want all of the textareas sent to you, you need to assign them to the same variable though. If you want a header for each different textarea for your email, so you can tell where one begins and the other ends, you can do that too. So the code becomes this: PHP Code:
Let me know if you need help customizing it!
__________________
Living with Louie dog's the only way to stay sane _____________________________________________ ... and with those words so begins my lifetime of longing for the devil's warm embrace Last edited by DumberDrummer : 01-12-2006 at 10:34 PM. |
|
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jun 2005
Location: Chicago, IL
Posts: 64
OS: WinXP Pro / OS 10.4 / Fedora 9
|
This php form works, but I'm having some probs. I go to fix all of the html e.g. to change:
input type = submit value =" Send" to: input type="submit" value="Send" but it keeps changing back!!! WHY????? I'll fix it and open up ws_ftp and view the code from there and it will show the first version. Is this a setting in ws_ftp? |
|
|
|
|
|
#6 (permalink) |
|
Cymru am byth
|
you need to upload the new file. Saving it on your computer doesn't save it to the server.
__________________
Living with Louie dog's the only way to stay sane _____________________________________________ ... and with those words so begins my lifetime of longing for the devil's warm embrace |
|
|
|
|
|
#8 (permalink) | |
|
Registered User
Join Date: Jun 2005
Location: Chicago, IL
Posts: 64
OS: WinXP Pro / OS 10.4 / Fedora 9
|
Quote:
I've been using ws_ftp for 3 years now and this is the first time I've ever seen it do this. Last edited by bdemonbr : 01-19-2006 at 08:21 PM. |
|
|
|
|
|
|
#9 (permalink) | ||
|
Analyst, Security Team
Join Date: Nov 2005
Location: UK
Posts: 1,968
OS: xp
|
Quote:
Quote:
![]() |
||
|
|
|
![]() |
| Thread Tools | |
|
|