Jump to content

kcotter

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Everything posted by kcotter

  1. I figured it out... at least one way to do it... <script type="text/javascript"> function validate(form) { if(!document.form1.agree.checked){alert("Please check the terms and conditions"); return false; } if(document.form1.emailto.selectedIndex==0) { alert("Please select a store location"); document.form1.emailto.focus(); return false; } return true; } //--> </SCRIPT> <form name="form1" method="post" action="sendorderform.php" onsubmit="return validate(this)"> Thanks to anyone who might have been thinking about helping me. I'm all set now.
  2. I'm very new to Java script and I've created a form with check boxes and a dropdown menu. I want to validate both on submit. I got it to work, but can't get them to work TOGETHER... I know I'm going about this wrong.. please help if possible... here's what I have: <script type="text/javascript"> function validate(form) { if(!document.form1.agree.checked){alert("Please check the terms and conditions"); return false; } return true; } </script> <form name="form1" method="post" action="sendorderform.php" onsubmit="return validate(this)"> AND <SCRIPT LANGUAGE="JavaScript"'> <!-- function validateForm(){ if(document.form1.emailto.selectedIndex==0) { alert("Please select an Item."); document.form1.emailto.focus(); return false; } return true; } //--> </SCRIPT> <form name="form1" method="post" action="sendorderform.php" onsubmit="return validateForm()"> Both of these, when put on the page alone, work great. But I don't know how to get them to work together. I need onsubmit to validate both things... Google isn't helping very much. Any help would be great!!! Thanks!
  3. perfect! Thanks a TON!!! I'm good for now! I have radio buttons and drop down menus on this html form.. So I'm sure I'll have more questions.. but you guys kick butt. This forum is sweet!
  4. oh.. dammit! I'll try that.. thanks! I suck at this stuff...
  5. Thanks! I don't think it's an html email... not quite sure how to tell.. But, I tried this one... and it didn't work: <?php $email = $_REQUEST['email'] ; $email_to = $_POST['emailto'] ; $message = "Someone just filled out the online order form! Here's there info:" . PHP_EOL; \n\n $message .= "CUSTOMER INFORMATION" . PHP_EOL; $message .= "Renters Name - {$_POST['rname']}" . PHP_EOL; mail( $email_to, "Online Application", $message, "From: $email\r\nBCC: kalcotter1@yahoo.com\r\n" ); ?>
  6. It works!!!!!!! You rock dude! Thanks for the advice also. Can you tell me how to add a return? or <br>? $message = "Someone just filled out the online order form! Here's there info:" . PHP_EOL; ***EXTRA RETURN RIGHT HERE*** $message .= "CUSTOMER INFORMATION" . PHP_EOL; $message .= "Renters Name - {$_POST['rname']}" . PHP_EOL;
  7. Anyone have any idea what I'm doing wrong? thanks!!!
  8. I tried taking what you said and putting it into code... I'm sure I did something wrong because it's not sending either email now... This is what I did (I know I left my real email in there... I don't care) <?php $email = $_REQUEST['email'] ; $email_to = $_POST['emailto'] ; $message = "Someone just filled out the online order form! Here's there info:\r\n"; $message .= "CUSTOMER INFORMATION\r\n"; $message .= "Renters Name - {$_POST['rname']}" . PHP_EOL; mail( $email_to, "Online Application", $message, "From: $email\r\nBCC: kalcotter1@yahoo.com\r\n" ); ?> Any clue what I'm doing wrong? Probably a few things I'm sure... thanks!
  9. for sure! I'm not complaining! Thanks again for the help... long story short I'm trying to make this damn form work: http://www.continentalrto.com/newfiles/orderform.html I'm done with the form (except giving the fields better id's) and now I'm starting on constructing the php part of it. Again... very new for me, but with the help of this site and Google, I hope I can figure it out. My next question is how to make the "message" on this: <?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $email_to = $_POST['emailto'] ; mail( $email_to, "Feedback Form Results", $message, "From: $email\r\nBCC: kalcotter1@yahoo.com\r\n" ); ?> have multiple lines and use the stuff from the form to make a somewhat readable email... what's the best way to go about that? I'm planning on making it read like: ------------------------------------------------ Someone just filled out the online order form! Here's there info: CUSTOMER INFORMATION Renters Name: (pull this part from the form) Date of Birth: (pull this part from the form) and so on.... ----------------------------------------------- Is there any way you could point me in the right direction? Do I just put $_REQUEST['id_name'] wherever I want to post something from the form? and how to I actually write "text" in a php email like this? Not sure how to type a return, (like hitting enter while typing) either... any help would be greatly appreciated!!!!!!!!!!!! Thanks again for the help thus far.. I've been at this for 5 hours, and you did more in 10 minutes than I could find on Google all night!
  10. does it make any sense that this would only work if the two addresses (the drop down, and the bcc) are different? I had them the same, thinking it would send 2 emails to my address... but it wouldn't work. Then I changed the address on the drop down to my other email address and I got the email to both. Is that possible that having the same address in both spots would stop it?
  11. I replaced my mail section: mail( $email_to, "Feedback Form Results", $message, "From: $email" ); with your mail section (put my email in instead of me@mail): mail( $email_to, "Feedback Form Results", $message, "BCC: me@mail.com\r\nFrom: $email" ); and I'm still only getting the email to the drop down address. Do I need to add more than that? Thanks a ton for the help!
  12. I want to have a form with a drop down menu that decides who gets the email. But I ALSO want the email to go to me. Can anyone tell me the simplest way to go about this? This is my form page: <form method="post" action="sendorderform.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <select name='emailto' id='emailto'> <option value='me@yahoo.com'>man1@website.com</option> <option value='man2@website.com'>man2@website.com</option> <option value='man3@website.com'>man3@website.com</option> <option value='man4@website.com'>man4@website.com</option> </select><br> <input type="submit" /> </form> This is my php page: <?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $email_to = $_POST['emailto'] ; mail( $email_to, "Feedback Form Results", $message, "From: $email" ); ?> I actually got this to send per the drop down. But, where do I put MY (fixed) email address to make it send TWO emails? Thanks for any help!!! I'm very new at this stuff.
  13. I realize that. But, I'm not putting credit cards here, just a simple blocker to keep out the average joes... Is it possible to make this accept many alternates?
  14. I found this simple password protect code online, and I'm wondering if someone can help me modify it. I need it to accept multiple login/passwords. Right now it accepts "login" and "password" as the login/password... can someone show me how to make it accept "login" & "password" AND "login2" & "password2" please??? I'm thinking to the right person this won't be too hard... thanks for any help!!! <script language="javascript"> function pasuser(form) { if (form.id.value=="login") { if (form.pass.value=="password") { location="http://quickonlinetips.com/" } else { alert("Wrong Password") } } else { alert("Wrong Username") } } </script> <form name="login"> Username: <input name="id" size="6" type="text"><br> Password: <input name="pass" size="6" type="password"><br><br> <input value="Login" onclick="pasuser(this.form)" type="button"> </form>
  15. Those are good points. Just so we're on the same page, I'm basically recreating a site just like this: http://www.continentalrto.com/ The color field would probably not be "avail_colors" it should just be "color" . If they have a black couch, they don't offer it in brown also... My mistake. But I thought I should have a field named "color" just so you could search the database for every black piece of furniture for example... Every product is individual, and the only relation it would have to other products is the category it's in. This seems like it shouldn't be that hard. I can't believe I can't find a tutorial to set up exactly what I'm talking about.
  16. Ok, so I was thinking about this again this morning. Please let me know if I'm way off base, but I'm thinking I should create 1 table, and call it all_products or something... and have the following fields or columns: id category1 category2 category3 title description avail_colors price image_name (not sure if this is possible or not, but each product would have an image in an "image" directory) Then I can create a php form where I can enter the info into text boxes that submit to these fields... at least this is the direction I'm thinking... does this seem like a good plan of attack?
  17. Yeah, I just started researching this tonight. If you have time to post up some links that would be cool. Over the next few days/weeks I plan on getting a crash course in mysql. I'm pretty green right now, but I know way more than I did 6 hours ago. thanks for the reply!
  18. ok, so I created my database with GoDaddy... I'm not really sure on how to set it up, so maybe you guys can help me, or get me going in the right direction.... I'm making a product catalog for a rent to own store. There will be no "cart" just a catalog that shows the price, title, and short description of each product. Also, a photo. Anyway, I have 4 main categories... Appliances, Computers, Electronics and Furniture. Now I'm getting confused because under Appliances (for example) there are 3 categories... Kitchen, Laundry and Other. Also under Kitchen (for example) there are 5 categories... Freezers, Microwaves, etc.... and under each of those categories are the actual products. For example, an Acme Freezer would be listed under Appliances>Kitchen>Freezers>.... So, my first issue is, I created a database, and I need to create a tables.. Do I start off with 4 tables (Appliances, Computers, Electronics and Furniture)? Or should I just make one table and call it Products and put every product in it? The only tutorials I can find are teaching me how to make a member log in and stuff... any help would be cool.
  19. thanks a lot for the help!!! I'm going to for sure look into phpMyAdmin. I'm at work now, and youtube (along with most other stuff) is blocked... I do know that I'll be using GoDaddy. And I'm pretty sure you can log on and create a database thru the godaddy interface, but maybe I don't need to do it that way if I use phpMyAdmin... For some reason I'm picture a database as a file that you can create. Then you just upload it to your mysql folder on your server... Am I even thinking the right way? Does phpMyAdmin help create the file (database)? Sorry for the stupid questions.. But, you're helping me a ton!
  20. Paying someone would be great, but I don't think I have the budget. Not sure how hard it would be for someone to set up my database so I could just add the furniture and stuff... I guess that could be easy for the right person. But, I'm sure there's more to it than I'm aware of.
  21. I wish... But, I probalby don't have the budget for that. What is the difference between a MySQL and just a Microsoft Access database? I'll look for some tutorials...
  22. Hello, I'm fairly new to PHP, and I'm looking to create an online catalog for a furniture/appliance store. I'm wondering the best way to go about this. I'm looking at SQLMaestro's "PHP Generator for MySQL" http://www.sqlmaestro.com/products/mysql/phpgenerator/ ... But, I'm curious if you guys can point me in the right direction. I've never created a database before, and I want to do it the way that makes the most sense... Any advice would be appreciated!!
  23. Here's my code... how can I send this info to (2) addresses???? <?php if (empty($_REQUEST['name']) || empty($_REQUEST['email'])) { print 'Please go back and Enter name and Email...<a href="form.html">Back</a>'; } else { print 'Thank you '.$name.' for registering to win! <a href="#" onclick="window.close();return false;">close</a>'; $name = "Name: ".$_REQUEST['name']."\n" ."Email: ".$_REQUEST['email']."\n" ."Address: ".$_REQUEST['address']."\n" ."City: ".$_REQUEST['city']."\n" ."State: ".$_REQUEST['state']."\n" ."Zip: ".$_REQUEST['zip']."\n" ."How they heard about us: ".$_REQUEST['hear']; mail("kalcotter1@yahoo.com", "Someone Registered at BuyWithoutDebt", $name, "From: BuyWithoutDebt@register.com\r\nReply-To: noreply@bwd.com\r\n"); } ?> THANKS!!!!!
  24. PERFECT!!!! thanks guys!!! Damn this forum rocks!!!
  25. perfect... that seemed easy.... ok. here's probably another easy one... after this part: "Thank you $name for registering to win!"; how would I put a close button???? thanks again!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.