Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post 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...
 



 
tarilottaSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
tarilotta wrote: [View Post]
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?
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
tarilotta wrote: [View Post]
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

Code: [Download] [Hide] [Select]
<?
$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
Code: [Download] [Hide] [Select]

<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
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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  
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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!  
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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?
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
tarilotta wrote: [View Post]
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
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
this one is "form.php"
Code: [Download] [Hide]
  1. <?  
  2. $message =" Player Name: $Name  
  3. Ship Name: $Ship_Name  
  4. Quantity: $Quantity  
  5. Refit: $Refit  
  6. Best Time to Contact: $Best_Time_to_Contact";  
  7. $subject = "Order Form From $Name";  
  8. $to="mail_example1@yahoo.com";  
  9.  
  10. mail($to, $subject, $message);  
  11.  
  12. header( 'Location: http://www.brotherhoodofcadiz.com/shipshop2.php' ) ;  
  13.  
  14. ?>  
  15.  


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

Code: [Download] [Hide]
  1. <html>  
  2. <head>  
  3. <title>Order Form</title>  
  4. </head>  
  5. <body>  
  6. <table>  
  7. <form id="form" method="post" action="form.php">  
  8. In-Game Name:<input type="text" size="12" maxlength="24" id="Name"><br />  
  9. Ship Name: <select id="Ship_Name">  
  10. <option value="--Choose Ship--">--Choose Ship--</option>  
  11. <option value="'Alexander' Fourth Rate">'Alexander' Fourth Rate</option>  
  12.           <!-- Edited out like 20 options between here -->  
  13. <option value="'Valient' Third Rate">'Valient' Third Rate</option>  
  14. <option value="'Wenden' Third Rate">'Wenden' Third Rate</option>  
  15. </select>  
  16. Quantity: <select id="Quantity">  
  17. <option value="-Quantity-">-Quantity-</option>  
  18. <option value="1">1</option>  
  19. <option value="2">2</option>  
  20. <option value="3">3</option>  
  21. </select><br />  
  22. If You Want It Refitted, Please Choose Which Type of Refit You Would Like:<br />  
  23. Mastercraft:<input type="radio" value="Mastercraft" id="Refit"><br />  
  24. Heavy:<input type="radio" value="Heavy" id="Refit"><br />  
  25. Sleek:<input type="radio" value="Sleek" id="Refit"><br />  
  26. <text>Please enter what time of day would be best to contact you in game, please include time zone...</text><br/>  
  27. <textarea rows="10" cols="50" id="Best_Time_to_Contact" wrap="physical">The best time to contact me would be...</textarea><br />  
  28. <input type="submit" value="Place Order" onclick="window.location.href='http://www.brotherhoodofcadiz.com/shipshop2.php'">  
  29. </form>  
  30. </table>  
  31. </body>  
  32. </html>  
  33.  



(This is for something for a game, people can order ships... thats why its got some funny names, LOL)
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
tarilotta wrote: [View Post]

Code: [Download] [Hide]
  1. <html>  
  2. <head>  
  3. <title>Order Form</title>  
  4. </head>  
  5. <body>  
  6. <table>  
  7. <form id="form" method="post" action="form.php">  
  8. In-Game Name:<input type="text" size="12" maxlength="24" id="Name"><br />  
  9. Ship Name: <select id="Ship_Name">  
  10. <option value="--Choose Ship--">--Choose Ship--</option>  
  11. <option value="'Alexander' Fourth Rate">'Alexander' Fourth Rate</option>  
  12.           <!-- Edited out like 20 options between here -->  
  13. <option value="'Valient' Third Rate">'Valient' Third Rate</option>  
  14. <option value="'Wenden' Third Rate">'Wenden' Third Rate</option>  
  15. </select>  
  16. Quantity: <select id="Quantity">  
  17. <option value="-Quantity-">-Quantity-</option>  
  18. <option value="1">1</option>  
  19. <option value="2">2</option>  
  20. <option value="3">3</option>  
  21. </select><br />  
  22. If You Want It Refitted, Please Choose Which Type of Refit You Would Like:<br />  
  23. Mastercraft:<input type="radio" value="Mastercraft" id="Refit"><br />  
  24. Heavy:<input type="radio" value="Heavy" id="Refit"><br />  
  25. Sleek:<input type="radio" value="Sleek" id="Refit"><br />  
  26. <text>Please enter what time of day would be best to contact you in game, please include time zone...</text><br/>  
  27. <textarea rows="10" cols="50" id="Best_Time_to_Contact" wrap="physical">The best time to contact me would be...</textarea><br />  
  28. <input type="submit" value="Place Order" onclick="window.location.href='http://www.brotherhoodofcadiz.com/shipshop2.php'">  
  29. </form>  
  30. </table>  
  31. </body>  
  32. </html>  
  33.  





In the html form, change the "id=" with "name="
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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...
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
I just redid my code and got it to work =]
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Click Submit->Send PM 
 
tarilotta wrote: [View Post]
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.


tarilotta wrote: [View Post]
I just redid my code and got it to work =]



Glad you solved. Did you figure out what the problem was?
 



 
VortexSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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  
 



 
tarilottaSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 
XusquiSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
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


  

 

  cron