Members dickf Posted January 9, 2012 Members Report Posted January 9, 2012 (edited) I'm in a giving mood! The html for your page <form action="make-order.php" method="post" id="order-frm" name="order-frm"> Your name <input type="text" name="user-name" id="user-name" /><br /> Your email address <input type="text" name="email" id="email" /><br /> Thread color: <select name="thread-color"> <option value="white">White</option> <option value="brown">Brown</option> <option value="black">Black</option> </select><br /> Leather color: <select name="leather-color"> <option value="natural">Natural</option> <option value="brown">Brown</option> <option value="black">Black</option> </select><br /> Left/Right hand <select name="hand"> <option value="right">Right</option> <option value="left">Left</option> </select><br /> <input type="submit" name="sub-bttn" id="sub-bttn" value="Send order" /> </form> The php to process the data and send an email (save this code as make-order.php). <?php // Script to accept form values and mail to yourself. // By US GUNLEATHER - 01.09.2012 // Site vars (edit these to suit your needs) $site_url = "Your site url"; // no www's or http's (ex. mycoolsite.com) // Where should this order be sent to? $recipient = "youremail@soemthing.com"; // Subject for the mail $mailsubject = "An order has been placed!"; // This is the page you'll send users to after the form is submitted $success = "thankyou.htm"; // Form vars $user_name = $_POST['user-name']; $email = $_POST['email']; $thread = $_POST['thread-color']; $leather = $_POST['leather-color']; $hand = $_POST['hand']; $today = date('l dS \of F Y h:i:s A'); // Mail headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers. = "From: ".$email." \r\n"; $headers .= "Reply-To: " . $email . "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); // Build mail message $mail_body = "Order from: " . $user_name . " (". $email .") \r\n". "Leather: " . $leather . "<br />" . "Thread: " . $thread . "<br />" . "Hand: " . $hand . "<br /> \r\n" . "********************************* \r\n" . "Order placed on " . $today; // fire mail function and redirect on success if(mail($recipient, $mailsubject, $mail_body, $headers) or die("Couldn't mail it out")){ header("location: ". $success); } ?> I can't test this at the moment, but I think it should work. Let me know if it needs tweaking. Edited January 9, 2012 by dickf Quote US GUNLEATHER www.usgunleather.com twitter.com/usgunleather facebook.com/USGUNLEATHER
Members particle Posted January 9, 2012 Members Report Posted January 9, 2012 (edited) I used to do a lot of website development, but over time I've done less and less of it because I didn't care to learn all the standards for website coding. Then, CMS hit the scene..... If you haven't tried it yet, I'd suggest you give Concrete5 a look. It's a free website development program (you still have to pay for hosting service) that is very easy to use. There are lots of templates available (some free, but you'll pay a small fee for the better templates that look much better), and you can even have someone build a custom template if you desire. There is lots of add-ons you can implement - many of them free, and the rest are (in my opinion) very fairly priced (usually around $15). Concrete5 comes with a standard form component (the drop-down boxes you're referring to are actually part of a "<form>" HTML (website code) element). If the standard form component in Concrete5 isn't powerful enough, you can pay for one that is a little more powerful. I've not used Word Press very much, but I hear it has a lot of add-ons as well (I'm sure it has even more than Concrete5). Check out my website for an example of a Concrete5 website. I'm using the basic template that's included with the program - I just created a custom header graphic. http://www.adamsleatherworks.com/ Here is my order form that I created using the Concrete5 default Form component. http://www.adamsleat...ing/order-form/ To give you an idea what you can do with a different template, here is the website I'm currently building for the architecture firm I work for. The website is built with Concrete5, but the actual content (the individual articles) is actually being delivered via WordPress using a WordPress plugin for Concrete5. I wanted our department's team to be able to login to the website and easily update the articles and add new articles easily. If I'd coded the site with Dreamweaver or built a Flash website, I'd be the only one that could edit it and it would have taken a lot more time since I'm not fluent with developing websites any more. Concrete5 is extremely easy to use. http://ghadesignlab.com/ Edited January 9, 2012 by particle Quote Eric Adamswww.adamsleatherworks.com | Facebook | YouTube | Instagram
RMB Custom Leather Posted January 9, 2012 Author Report Posted January 9, 2012 Great information thank you! I opened a worpress up and trying to figure out how to get a retail store out of it, just lost with the code thing where do you put them etc. I know little about this and want to learn to handle my own site but can't seem to connect the dots from the concrete 5 and wordpress thing to a site like I need. I guess I will keep trying stuff until it looks like a retail site. Quote Thank you, Rob Bennett Email: rob@rmbcl.com Authorized Distributor BLUEGUNS Multi Molds Maker Supplies Home of the "Taco Press" kydex/Leather former FREE SHIPPING! FACEBOOK
Members CitizenKate Posted January 10, 2012 Members Report Posted January 10, 2012 Hi Rob and others, sorry for the slow reply. I guess I'll make it official, since I've gotten numerous inquiries in the past couple of months. Thanks for your interest in having me do your site, but I've got enough work for the time being, and it's no fun for me or my clients when I get overbooked, so I'm not looking to add new clients at this time. I also recommend using Concrete5 for most sites. I prefer it over all the other major open source content management systems. Once you've got it tricked-out with a nice theme and add-ons, it's extremely easy for just about anyone to maintain the content. Kate Quote
Members cem Posted January 10, 2012 Members Report Posted January 10, 2012 Here is my order form that I created using the Concrete5 default Form component. http://www.adamsleat...ing/order-form/ To give you an idea what you can do with a different template, here is the website I'm currently building for the architecture firm I work for. The website is built with Concrete5, but the actual content (the individual articles) is actually being delivered via WordPress using a WordPress plugin for Concrete5. I wanted our department's team to be able to login to the website and easily update the articles and add new articles easily. If I'd coded the site with Dreamweaver or built a Flash website, I'd be the only one that could edit it and it would have taken a lot more time since I'm not fluent with developing websites any more. Concrete5 is extremely easy to use. http://ghadesignlab.com/ Thank you for the info particle as that is similar to what I want to do, I wasn't aware you could get wordpess plugins for Concrete 5, I might have to take another look at it. Cheers, Clair Quote
Members Sylvia Posted January 10, 2012 Members Report Posted January 10, 2012 Bravo for your generosity, USGun. I'm in a giving mood! The html for your page <form action="make-order.php" method="post" id="order-frm" name="order-frm"> Your name <input type="text" name="user-name" id="user-name" /><br /> Your email address <input type="text" name="email" id="email" /><br /> Thread color: <select name="thread-color"> <option value="white">White</option> <option value="brown">Brown</option> <option value="black">Black</option> </select><br /> Leather color: <select name="leather-color"> <option value="natural">Natural</option> <option value="brown">Brown</option> <option value="black">Black</option> </select><br /> Left/Right hand <select name="hand"> <option value="right">Right</option> <option value="left">Left</option> </select><br /> <input type="submit" name="sub-bttn" id="sub-bttn" value="Send order" /> </form> The php to process the data and send an email (save this code as make-order.php). <?php // Script to accept form values and mail to yourself. // By US GUNLEATHER - 01.09.2012 // Site vars (edit these to suit your needs) $site_url = "Your site url"; // no www's or http's (ex. mycoolsite.com) // Where should this order be sent to? $recipient = "youremail@soemthing.com"; // Subject for the mail $mailsubject = "An order has been placed!"; // This is the page you'll send users to after the form is submitted $success = "thankyou.htm"; // Form vars $user_name = $_POST['user-name']; $email = $_POST['email']; $thread = $_POST['thread-color']; $leather = $_POST['leather-color']; $hand = $_POST['hand']; $today = date('l dS \of F Y h:i:s A'); // Mail headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers. = "From: ".$email." \r\n"; $headers .= "Reply-To: " . $email . "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); // Build mail message $mail_body = "Order from: " . $user_name . " (". $email .") \r\n". "Leather: " . $leather . "<br />" . "Thread: " . $thread . "<br />" . "Hand: " . $hand . "<br /> \r\n" . "********************************* \r\n" . "Order placed on " . $today; // fire mail function and redirect on success if(mail($recipient, $mailsubject, $mail_body, $headers) or die("Couldn't mail it out")){ header("location: ". $success); } ?> I can't test this at the moment, but I think it should work. Let me know if it needs tweaking. Quote A teacher pointed at me with a ruler and said "At the end of this ruler is an idiot." I got detention when I asked "Which end?"
RMB Custom Leather Posted January 10, 2012 Author Report Posted January 10, 2012 (edited) Well it turns out that what had opened was just a wordpress free blog from wordpress.com were I needed to go was wordpress.org I think anyway. After researching the pros / cons of Concrete 5 and wordpress I think I am going with the Concrete5. Has any used Bluehost? for hosting before they look like a good deal and responded to their live chat pretty well. I may repost a poll on this just to see who most are using, Concrete5 recommends some but wonder who has the best deal for the money. Edited January 10, 2012 by RMB Custom Leather Quote Thank you, Rob Bennett Email: rob@rmbcl.com Authorized Distributor BLUEGUNS Multi Molds Maker Supplies Home of the "Taco Press" kydex/Leather former FREE SHIPPING! FACEBOOK
Members particle Posted January 10, 2012 Members Report Posted January 10, 2012 I've used bluehost for years and have been happy with them. Quote Eric Adamswww.adamsleatherworks.com | Facebook | YouTube | Instagram
Members dickf Posted January 10, 2012 Members Report Posted January 10, 2012 Bravo for your generosity, USGun. Thanks, I didn't think anyone noticed. RMB, is this your site? http://www.allaboutpocketknives.com If so, add a domain to your hosting package that's already set up. FWIW, I've used 1and1.com for years with no issues or surprises. Quote US GUNLEATHER www.usgunleather.com twitter.com/usgunleather facebook.com/USGUNLEATHER
Members Sylvia Posted January 10, 2012 Members Report Posted January 10, 2012 Thanks, I didn't think anyone noticed. RMB, is this your site? http://www.allaboutpocketknives.com If so, add a domain to your hosting package that's already set up. FWIW, I've used 1and1.com for years with no issues or surprises. I always try to acknowledge good people and random acts of kindness when ever I see it in action..... especially when it occurs online. RMB's site is in his signature line. www.rmbcustomleather.com I think that is the one he wants to fix up. Though, it sounds as if he's looking at other options at the moment. Sylvia Quote A teacher pointed at me with a ruler and said "At the end of this ruler is an idiot." I got detention when I asked "Which end?"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.