Jump to content

7pm

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

7pm's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 7pm

    PHP Mail Issue

    techy stuff kills me...it's working now...i don't get it. i'll have to see what's up with this.
  2. 7pm

    PHP Mail Issue

    this is scarry....nobody can help? LOL
  3. hi there...if someone can help out [b]asap[/b] would be great! i received help on this board [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87985&st=\" target=\"_blank\"]HERE[/a] in order to get this code working and it tested out fine a few weeks back. i tried it now and can't get it to work. it's not sending me the email. i've checked with the main server and i was told it's running operating PHP fine. can someone look over the code and URL if need be to see if they notice any imperfections as to why it won't work now? the URL of the page it's used on is [a href=\"http://www.cajjmere.com/online/order.html\" target=\"_blank\"]HERE[/a]. Many thanks in advance! php code below: (minus first and last > symbols) html> <head> <title>D'LISH-US MUSIC ONLINE STORE - CAJJMERE.COM</title> </head> <body style="font-family: Arial"> <h1><br> D'LISH-US MUSIC ONLINE STORE</h1> <br><br> <?php $qtyrun = $_POST['qtyrun']; $qtyex = $_POST['qtyex']; $qtylate = $_POST['qtylate']; $qtyturn = $_POST['qtyturn']; $name = $_POST['yourname']; $email = $_POST['email']; $address = $_POST['address']; //START MY ADDITIONS// if(!$name or !$email or !$address) { if(!$name) die("You did not enter your name!"); if(!$email) die("You did not enter your email address!"); if(!$address) die("You did not enter your address!"); } //make sure the email is a valid one using a simple regular exp. i found at regexlib.com if(!preg_match("#^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$#", $email) ) { die("This is not a valid email address!"); } //use the simple function strip_tags() to clean out any html and JS from input $name = strip_tags($name); $address = strip_tags($address); //do some small variable handling $qtyrun = ($qtyrun == "") ? "0" : $qtyrun; $qtyex = ($qtyex == "") ? "0" : $qtyex; $qtylate = ($qtylate == "") ? "0" : $qtylate; $qtyturn = ($qtyturn == "") ? "0" : $qtyturn; //The above four lines will substitute the string "0" into the quantity variables if they are left empty. //make the body text that will be emailed $body = "An order has been submitted by: {$name}. They have requested the following quantities: DLI001 RUNWAY EP: {$qtyrun} DLI002 EXSTACY QUEEN: {$qtyex} DLI003 LATE NITE EP: {$qtylate} DLICD0602 TURNING IT: {$qtyturn} The address specified was: {$address}"; $subject = "Order form from {$name}"; mail("orders@cajjmere.com", $subject, $body, "From: {$email}"); //Order form sent! echo "Your order has been recieved and will be processed shortly!"; ?> <p>Thank you for shopping at D'Lish-Us Music. <p>You should receive an email with full payment instructions within two hours.</p> </body> </html
  4. 7pm

    ISSUE!! :)

    Well I asked, and PHP is infact running properly on the main server, so then I am still lost as to what is up here. PLEASE people...i still need help with this, anyone????
  5. 7pm

    ISSUE!! :)

    The header in the php you mean between the <head> section like at the top of html? Like I said i'm bad with this stuff. Also, not sure how to use that ECHO feature. [!--quoteo(post=363224:date=Apr 10 2006, 04:53 AM:name=Yesideez)--][div class=\'quotetop\']QUOTE(Yesideez @ Apr 10 2006, 04:53 AM) [snapback]363224[/snapback][/div][div class=\'quotemain\'][!--quotec--] Just located another topic I helped with emails: [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=90555\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=90555[/a] Make sure the header is formatted properly as I've had problems with it before myself and realised I'd been a bit too tired and missed something off the end. If at the end you still have problems, try using ECHO to display the contents of the variables passed to mail() so you can see exactly what they contain - weird stuff can happen to their contents with a missing quote or misplaced full stop. [/quote]
  6. 7pm

    ISSUE!! :)

    yeah oddly enuff, it worked fine at first... [!--quoteo(post=363222:date=Apr 10 2006, 04:49 AM:name=Yesideez)--][div class=\'quotetop\']QUOTE(Yesideez @ Apr 10 2006, 04:49 AM) [snapback]363222[/snapback][/div][div class=\'quotemain\'][!--quotec--] Was it sending emails before and not now? [/quote]
  7. 7pm

    ISSUE!! :)

    Well not sure how else to say it, "it doesn't work anymore", lol. But thank you for that code check i'll try that change up. This was originally created and tested in [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87985&st=\" target=\"_blank\"]THIS[/a] thread. I don't get why it's not working anymore. I'm also checking with my webhost to make sure PHP is installed and working properly on the main server. [!--quoteo(post=363218:date=Apr 10 2006, 04:40 AM:name=Yesideez)--][div class=\'quotetop\']QUOTE(Yesideez @ Apr 10 2006, 04:40 AM) [snapback]363218[/snapback][/div][div class=\'quotemain\'][!--quotec--] If you surround your code with the bbcode "CODE" tags it'd be easier to read. Also, I suggest being a little more specific with what your problem is instead of just saying it doesn't work. Try and say what you want it to do, what it isn't doing and what data you're throwing at it - will increase the chances of some help. But! Saying that I did see this little abnormality: [code]if(!$name or !$email or !$address) {[/code] Try changing to: [code]if(!$name || !$email || !$address) {[/code] [/quote]
  8. 7pm

    ISSUE!! :)

    MOVED TO 'PHP HELP'
  9. 7pm

    PHP Issue

    [!--quoteo(post=353471:date=Mar 9 2006, 08:07 PM:name=Flinch)--][div class=\'quotetop\']QUOTE(Flinch @ Mar 9 2006, 08:07 PM) [snapback]353471[/snapback][/div][div class=\'quotemain\'][!--quotec--] Indeed. Just like that. :) But, as your catalogue gets bigger, I would suggest implementing a database to make your job easier. PHP and MySQL (when used correctly) can be a powerful and will saw through any project you might need done. [/quote] [b][!--sizeo:3--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]AWESOME!![!--sizec--][/span][!--/sizec--] Many Thanks Flinch you are the best!! The record label thanks you also![/b]
  10. 7pm

    PHP Issue

    SUCCESS!! It worked! Very cool. So lemme ask you Flinch. In the future when products are being added to the catalogue I assume that it would be added to these sections below. (using the word EXAMPLE often) $qtyrun = $_POST['qtyrun']; $qtyex = $_POST['qtyex']; $qtylate = $_POST['qtylate']; $qtyturn = $_POST['qtyturn']; [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]$qtyEXAMPLE1 = $_POST['EXAMPLE1']; $qtyEXAMPLE2 = $_POST['EXAMPLE2'];[!--colorc--][/span][!--/colorc--] $name = $_POST['yourname']; $email = $_POST['email']; $address = $_POST['address']; //START MY ADDITIONS// //do some small variable handling $qtyrun = ($qtyrun == "") ? "0" : $qtyrun; $qtyex = ($qtyex == "") ? "0" : $qtyex; $qtylate = ($qtylate == "") ? "0" : $qtylate; $qtyturn = ($qtyturn == "") ? "0" : $qtyturn; [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]$qtyEXAMPLE1 = ($qtyEXAMPLE1 == "") ? "0" : $qtyEXAMPLE1; $qtyEXAMPLE2 = ($qtyEXAMPLE2 == "") ? "0" : $qtyEXAMPLE2;[!--colorc--][/span][!--/colorc--] They have requested the following quantities: DLI001 RUNWAY EP: {$qtyrun} DLI002 EXSTACY QUEEN: {$qtyex} DLI003 LATE NITE EP: {$qtylate} DLICD0602 TURNING IT: {$qtyturn} [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]EXAMPLE EXAMPLE1: {$qtyEXAMPLE1} EXAMPLE EXAMPLE2: {$qtyEXAMPLE2}[!--colorc--][/span][!--/colorc--] Correct?
  11. 7pm

    PHP Issue

    Well I copied that over and tried out the form and it didn't work for me ....that's odd. Try it out Flinch. click here for the form -> [a href=\"http://www.cajjmere.com/online/order.html\" target=\"_blank\"]*FORM*[/a] I tried, and it just gave me a clear white screen. this is my current code as you displayed to me. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>D'LISH-US MUSIC ONLINE STORE - CAJJMERE.COM</title> </head> <body style="font-family: Arial"> <h1><br> D'LISH-US MUSIC ONLINE STORE</h1> <br><br> <?php $qtyrun = $_POST['qtyrun']; $qtyex = $_POST['qtyex']; $qtylate = $_POST['qtylate']; $qtyturn = $_POST['qtyturn']; $name = $_POST['yourname']; $email = $_POST['email']; $address = $_POST['address']; //START MY ADDITIONS// if(!$name or !$email or !$address) { if(!$name) die("You did not enter your name!"); if(!$email) die("You did not enter your email address!"); if(!$address) die("You did not enter your address!"); } //make sure the email is a valid one using a simple regular exp. i found at regexlib.com if(!preg_match("#^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$#", $email) ) { die("This is not a valid email address!"; } //use the simple function strip_tags() to clean out any html and JS from input $name = strip_tags($name); $address = strip_tags($address); //do some small variable handling $qtyrun = ($qtyrun == "") ? "0" : $qtyrun; $qtyex = ($qtyex == "") ? "0" : $qtyex; $qtylate = ($qtylate == "") ? "0" : $qtylate; $qtyturn = ($qtyturn == "") ? "0" : $qtyturn; //The above four lines will substitute the string "0" into the quantity variables if they are left empty. //make the body text that will be emailed $body = "An order has been submitted by: {$name}. They have requested the following quantities: DLI001 RUNWAY EP: {$qtyrun} DLI002 EXSTACY QUEEN: {$qtyex} DLI003 LATE NITE EP: {$qtylate} DLICD0602 TURNING IT: {$qtyturn} The address specified was: {$address}"; $subject = "Order form from {$name}"; mail("orders@cajjmere.com", $subject, $body, "From: {$email}"); //Order form sent! echo "Your order has been recieved and will be processed shortly! Thank you for your business!"; ?> </body> </html>
  12. 7pm

    PHP Issue

    [!--quoteo(post=353445:date=Mar 9 2006, 07:01 PM:name=Flinch)--][div class=\'quotetop\']QUOTE(Flinch @ Mar 9 2006, 07:01 PM) [snapback]353445[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code] $qtyrun = $_POST['qtyrun']; $qtyex = $_POST['qtyex']; $qtylate = $_POST['qtylate']; $qtyturn = $_POST['qtyturn']; $name = $_POST['yourname']; $email = $_POST['email']; $address = $_POST['address']; //START MY ADDITIONS// if(!$name or !$email or !$address) {   if(!$name) die("You did not enter your name!");   if(!$email) die("You did not enter your email address!");   if(!$address) die("You did not enter your address!"); } //make sure the email is a valid one using a simple regular exp. i found at regexlib.com if(!preg_match("#^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$#", $email) ) {       die("This is not a valid email address!"; } //use the simple function strip_tags() to clean out any html and JS from input $name = strip_tags($name); $address = strip_tags($address); [/code] That's the simplest way to do all the form verification for the personal information. Sorry, I'm feeling a little lazy and I don't want to write out the entire script for you. :) [/quote] Awww thanks flinch! But don't feel lazy man, please help me out if you can?. I've placed that verification part where you showed me. Now it's the email part I guess that is left? I'm so screwed on this.... also i'm confused on the last part there, cuz i tried the form after copying that over by leaving the email blank for example and it didn't verify and tell me to go back.
  13. 7pm

    PHP Issue

    [!--quoteo(post=353436:date=Mar 9 2006, 06:39 PM:name=Flinch)--][div class=\'quotetop\']QUOTE(Flinch @ Mar 9 2006, 06:39 PM) [snapback]353436[/snapback][/div][div class=\'quotemain\'][!--quotec--] I just posted this in your duped topic: Well, right now your script isn't doing anything, except gathering the vartiables. It needs to first do some data checking, you know, like making sure that no required input fields were left blank, and that the data entered in those input fields is legit and secure. You can mostly check these things with regular expressions, such as making sure it's a valid email address. Next, after you've made sure that all the data entered is where it's supposed to be and correct, then you can send it via email using the mail() function. [/quote] Thank you Flinch, however I do not know how to do any of those things I require someone to give me actual guidance by looking at my codes and telling what needs to be added, and where so I can copy and paste it over. This is not my forte really, hope you guys don't see me as some nut, lol.
  14. 7pm

    PHP Issue

    SORRY ALL... THIS IS A DUPE TOPIC BY MY ERROR. DO NOT LEAVE HELP HERE, INSTEAD THE OTHER THREAD PLEASE. [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=87985&st=0&gopid=353433&#entry353433\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...33&#entry353433[/a] Thanx ;-)
  15. 7pm

    PHP Issue

    [!--quoteo(post=353429:date=Mar 9 2006, 06:28 PM:name=Gaia)--][div class=\'quotetop\']QUOTE(Gaia @ Mar 9 2006, 06:28 PM) [snapback]353429[/snapback][/div][div class=\'quotemain\'][!--quotec--] You may want to take a look at the mail() function. [a href=\"http://ca3.php.net/manual/en/ref.mail.php\" target=\"_blank\"]http://ca3.php.net/manual/en/ref.mail.php[/a] [/quote] Hi Gaia, thank you for the link. I'm extremely brain dead with this tho. I looked over all that and i'm too new to this to understand any of it. It reads like bad stereo instructions, LOL. The codeing i've obtained thus far was just by copy and paste mode with a few alterations to suit the site that i'm creating. That's why I need someone to look over my existing code and tell me what needs to added and where by example.
×
×
  • 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.