|
Page 1 of 2
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Click Submit->Send PM
Can anyone tell me how to make it so that when someone hits the submit button, it will send me what they put in a PM?
Like I made a form, and I want it so when they submit it, it will send a PM to me...
|
#1 Tue 11 Mar, 2008 20:49 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Vortex 
Joined: October 2006
Posts: 412
Location:  Prato, Italy
|
 Re: Click Submit->Send PM
Can anyone tell me how to make it so that when someone hits the submit button, it will send me what they put in a PM?
Like I made a form, and I want it so when they submit it, it will send a PM to me...
Are you talking about messaging in forums?
|
#2 Tue 11 Mar, 2008 20:51 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
No, I have a website... Hosted by IP...
I created a HTML order form, I want it so that when someone comes to my site, they fill out the form and when they click submit it will send it to me in a PM
kind of like the "mailto:example1@exapmle4.com" function
only this doesnt work because anyone who doesnt have the program Outlook Express installed it wont let them send it, and it doesnt send automatically...
So i was just wondering if anyone knew what the code was so that after the customer hit "submit" the form content would be sent to me in a PM
|
#3 Tue 11 Mar, 2008 21:42 |
|
Vortex 
Joined: October 2006
Posts: 412
Location:  Prato, Italy
|
 Re: Click Submit->Send PM
No, I have a website... Hosted by IP...
I created a HTML order form, I want it so that when someone comes to my site, they fill out the form and when they click submit it will send it to me in a PM
kind of like the "mailto:example1@exapmle4.com" function
only this doesnt work because anyone who doesnt have the program Outlook Express installed it wont let them send it, and it doesnt send automatically...
So i was just wondering if anyone knew what the code was so that after the customer hit "submit" the form content would be sent to me in a PM
Well this is not strictly Icy Phoenix related...
Anyway, if I understood, look if this could go for you (it's very rough, just to give you the idea  ):
Quote:
form.php
<?
$message =" $message_html";
$subject = "Message - $nick_self sent you a message";
$to="yourmail <mail@mail.com>";
mail($to, $subject, $message);
echo "Message sent.";
?>
form.html
<html>
<head>
<title>TITLE</title>
</head>
<body>
<form name="form" method="post" action="form.php">
Nick: <input name="nick_self" type="text" id="nick_self">
<br/><br/>
<textarea name="text" id="message_html"></textarea>
<br/><br/>
<input type="submit" name="Submit" value="Send">
</form>
</body>
</html>
You can find many examples of php mail function on the net, if you really can't succeed, try again here, someone will help
|
#4 Tue 11 Mar, 2008 22:16 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
Yes, I knew this isnt really IP related, but I figured i might as well ask here and see if anyone has the answer, or can point me in the right direction seeing as there seems to be many intelligent helpful people on here =]
Thank you for replying and getting these codes...
This is what I currently have set up, on one of the forms (i made a few different copies to try different mail things to get it to send better) but maybe I typed something wrong, very possible =P LOL, but i will use these and see if it works
Thanks for the reply =]
And i did try to find the mail thing on the web, but for some reason the one that everyone kept suggesting was the mailto: function...
Well thanks again for the help
|
#5 Thu 13 Mar, 2008 04:56 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
Alright, i found what i did wrong, and what you gave me worked, with a little editing....
Thank you so much for your help!
|
#6 Thu 13 Mar, 2008 05:54 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
Hey, I had everything working properly, I submitted the form numerous times with many different orders and it worked every time.
So then I got an idea to try to make it cooler after i submitted it... well my idea didnt work so i restored it to what it was the first time when it was working (i copied the code somewhere else to it was saved exactly). After I put in the original code again and refreshed the file into the FTP so that the site would recognize it I tried to order something and the form came back to me blank. all of a sudden the reference things in the code, like $Name and $Quantity and stuff, aren't working. In my subject line i put "Order Form From $Name", this worked before, but now for some reason it isnt working.
Do you know why this might be?
|
#7 Sat 15 Mar, 2008 01:16 |
|
Vortex 
Joined: October 2006
Posts: 412
Location:  Prato, Italy
|
 Re: Click Submit->Send PM
Hey, I had everything working properly, I submitted the form numerous times with many different orders and it worked every time.
So then I got an idea to try to make it cooler after i submitted it... well my idea didnt work so i restored it to what it was the first time when it was working (i copied the code somewhere else to it was saved exactly). After I put in the original code again and refreshed the file into the FTP so that the site would recognize it I tried to order something and the form came back to me blank. all of a sudden the reference things in the code, like $Name and $Quantity and stuff, aren't working. In my subject line i put "Order Form From $Name", this worked before, but now for some reason it isnt working.
Do you know why this might be?
Post the code here please
|
#8 Sat 15 Mar, 2008 01:44 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
this one is "form.php"
- <?
- $message =" Player Name: $Name
- Ship Name: $Ship_Name
- Quantity: $Quantity
- Refit: $Refit
- Best Time to Contact: $Best_Time_to_Contact";
- $subject = "Order Form From $Name";
- $to="mail_example1@yahoo.com";
-
- mail($to, $subject, $message);
-
- header( 'Location: http://www.brotherhoodofcadiz.com/shipshop2.php' ) ;
-
- ?>
-
this one is way longer normally, but i took out some of the middle content that doesnt matter...
its just option that the customer can choose from, Im just gonna shorten the list so its not so long...
- <html>
- <head>
- <title>Order Form</title>
- </head>
- <body>
- <table>
- <form id="form" method="post" action="form.php">
- In-Game Name:<input type="text" size="12" maxlength="24" id="Name"><br />
- Ship Name: <select id="Ship_Name">
- <option value="--Choose Ship--">--Choose Ship--</option>
- <option value="'Alexander' Fourth Rate">'Alexander' Fourth Rate</option>
- <!-- Edited out like 20 options between here -->
- <option value="'Valient' Third Rate">'Valient' Third Rate</option>
- <option value="'Wenden' Third Rate">'Wenden' Third Rate</option>
- </select>
- Quantity: <select id="Quantity">
- <option value="-Quantity-">-Quantity-</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- </select><br />
- If You Want It Refitted, Please Choose Which Type of Refit You Would Like:<br />
- Mastercraft:<input type="radio" value="Mastercraft" id="Refit"><br />
- Heavy:<input type="radio" value="Heavy" id="Refit"><br />
- Sleek:<input type="radio" value="Sleek" id="Refit"><br />
- <text>Please enter what time of day would be best to contact you in game, please include time zone...</text><br/>
- <textarea rows="10" cols="50" id="Best_Time_to_Contact" wrap="physical">The best time to contact me would be...</textarea><br />
- <input type="submit" value="Place Order" onclick="window.location.href='http://www.brotherhoodofcadiz.com/shipshop2.php'">
- </form>
- </table>
- </body>
- </html>
-
(This is for something for a game, people can order ships... thats why its got some funny names, LOL)
|
#9 Sat 15 Mar, 2008 06:46 |
|
Vortex 
Joined: October 2006
Posts: 412
Location:  Prato, Italy
|
 Re: Click Submit->Send PM
- <html>
- <head>
- <title>Order Form</title>
- </head>
- <body>
- <table>
- <form id="form" method="post" action="form.php">
- In-Game Name:<input type="text" size="12" maxlength="24" id="Name"><br />
- Ship Name: <select id="Ship_Name">
- <option value="--Choose Ship--">--Choose Ship--</option>
- <option value="'Alexander' Fourth Rate">'Alexander' Fourth Rate</option>
- <!-- Edited out like 20 options between here -->
- <option value="'Valient' Third Rate">'Valient' Third Rate</option>
- <option value="'Wenden' Third Rate">'Wenden' Third Rate</option>
- </select>
- Quantity: <select id="Quantity">
- <option value="-Quantity-">-Quantity-</option>
- <option value="1">1</option>
- <option value="2">2</option>
- <option value="3">3</option>
- </select><br />
- If You Want It Refitted, Please Choose Which Type of Refit You Would Like:<br />
- Mastercraft:<input type="radio" value="Mastercraft" id="Refit"><br />
- Heavy:<input type="radio" value="Heavy" id="Refit"><br />
- Sleek:<input type="radio" value="Sleek" id="Refit"><br />
- <text>Please enter what time of day would be best to contact you in game, please include time zone...</text><br/>
- <textarea rows="10" cols="50" id="Best_Time_to_Contact" wrap="physical">The best time to contact me would be...</textarea><br />
- <input type="submit" value="Place Order" onclick="window.location.href='http://www.brotherhoodofcadiz.com/shipshop2.php'">
- </form>
- </table>
- </body>
- </html>
-
In the html form, change the "id=" with "name="
|
#10 Sat 15 Mar, 2008 19:35 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
thats what i had originally
and it didnt work
so i checked back here to the one u said, because the form i have i made myself, and i figured i might as well try ising "id" instead of name...
I just forgot to switch it back when i put it in here...
but when it has "name" or "id" it doesnt work either way...
|
#11 Sat 15 Mar, 2008 22:35 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
I just redid my code and got it to work =]
|
#12 Sun 16 Mar, 2008 00:42 |
|
Vortex 
Joined: October 2006
Posts: 412
Location:  Prato, Italy
|
 Re: Click Submit->Send PM
thats what i had originally
and it didnt work
so i checked back here to the one u said, because the form i have i made myself, and i figured i might as well try ising "id" instead of name...
I just forgot to switch it back when i put it in here...
but when it has "name" or "id" it doesnt work either way...
It's strange, I tested it with the "name" tag and fields were not blank anymore.
I just redid my code and got it to work =]
Glad you solved. Did you figure out what the problem was?
|
#13 Sun 16 Mar, 2008 08:33 |
|
tarilotta 
Joined: September 2007
Posts: 17
|
 Re: Click Submit->Send PM
Well originally i had it labeled "name"
--that didn't work
Then i changed it to "id"
--that didn't work
Then i changed it back to "name"
--that didn't work
So i kept it as "name" for a day and sent myself like 13 forms throughout the day
Then the next day i set them to "id" and, again, left it for a day and sent a bunch of the forms...
Then the next day i set it back to "name" and it worked...
So im still confused as to why it wasnt workin
but im not gonna argue, its working now and i got other projects im workin on too, so im just happy it works now
|
#14 Sun 23 Mar, 2008 00:41 |
|
Xusqui 
Joined: August 2006
Posts: 211
Location:  C?rdoba
|
 Re: Click Submit->Send PM
And don't you like "www.yourdomain.com/IP_Directory/contact_us.php" form?
Greets!
____________ Icy Phoenix Latest 2.0 (working pending)
Style: Aphrodite and MG_Themes
Site: Spanish Stephen King fan forum
Mods: Medal System Mod. BBAntispam 1.2. Several own BBcodes.
|
#15 Sun 23 Mar, 2008 12:32 |
|
|
Page 1 of 2
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|