coolcat50 0 Report post Posted October 5, 2007 I want to create my own e-mail form for my site and I don't quite know if JavaScript or PHP is required. I use my Nintendo Wii to manage my sites so I only can use what my webhost allows. I am using Angelfire for my main site and InvisionPlus for my forums. I'm planning on switching to Xisto for my main site. Well here is my current code. Please tell me what I need to change. <form action="mailto:EMAIL" method="post"><input type="text" value="From"><br /><input type="text" value="Subject"><br /><textarea cols="5" rows="10" wrap="true">Message</textarea><br /><input type="submit" value="Send"> <input type="reset" value="Reset"></form> Share this post Link to post Share on other sites
galexcd 0 Report post Posted October 5, 2007 (edited) If I understand what you are asking this should work. You will need a webhost with php, and its own mailservers, which Xisto has both! (I think)Try this: <?phpif(isset($_POST['From'])){if(mail("YOUREMAIL@GOES.HERE",$_POST['Subject'],$_POST['Message'],"From: ".$_POST['From']))echo'<font color="green">Your message was sent!</font>';else echo'<font color="red">There was an error sending the message</font>';}else{?><form method="post"><input type="text" name="From" value="From"><br /><input type="text" name="Subject" value="Subject"><br /><textarea cols="5" rows="10" wrap="true" name="Message">Message</textarea><br /><input type="submit" value="Send"> <input type="reset" value="Reset"></form><?php}?> Edited October 5, 2007 by alex7h3pr0gr4m3r (see edit history) Share this post Link to post Share on other sites
coolcat50 0 Report post Posted October 5, 2007 Thanks! No copy-paste though . I'm new to PHP so I could never have coded that. Share this post Link to post Share on other sites
galexcd 0 Report post Posted October 5, 2007 What do you mean "no copy-paste"? Does it work? And is that what you wanted it to do? Share this post Link to post Share on other sites
coolcat50 0 Report post Posted October 5, 2007 That's what I needed.Can't test it yet.(Trying to get 10 credits)I can't select the text, copy it, and paste it somewhere else. Share this post Link to post Share on other sites
MotU2510 0 Report post Posted October 5, 2007 Try having a look at W3Schools PHP Email tutorial which can be found here. I found this tutorial a help many a-time when coding feedback forms. Share this post Link to post Share on other sites
sonesay 7 Report post Posted October 7, 2007 How would the email look from the recievers end? I mean would they see the return address of the email something linke yourusername@Xisto.com? Share this post Link to post Share on other sites
galexcd 0 Report post Posted October 8, 2007 if(mail("YOUREMAIL@GOES.HERE",$_POST['Subject'],$_POST['Message'],"From: ".$_POST['From'])) They will see whatever you put in for YOUREMAIL@GOES.HERE. Any string you put in there is what they will see as from. I'd advise making it a real email address otherwise they won't know what email to return it to.If you want to you could even change the domain name behind the @ symbol, but they can always see the actual domain that mailed it by looking at the headers of the original mailed data, but that data is usually hidden from the user unless you specifically request it. Share this post Link to post Share on other sites
coolcat50 0 Report post Posted October 8, 2007 Thanks! I'm just trying to code a support form for troubleshooting.I'm a noob to programming and I'm trying to get into it. Lol. Share this post Link to post Share on other sites