Jump to content

phppup

Members
  • Content Count

    342
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phppup

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. phppup

    Best approach guidance

    We'll see. Thanks for the input. Meanwhile, I hope my questions about code for birthdays doesn't get lost in this thread.
  2. phppup

    Best approach guidance

    Can I use the timestampdiff to adapt the the script to display when someone's birthday occurs? Would it work as this? Our is there a better implementation? SELECT ... WHERE timestampdiff(YEAR, date_of_birth, curdate()) = 0 Or do I need to separate mm-dd and use YYYY to determine age?
  3. phppup

    Best approach guidance

    Hey ginerjim: The "shorthand" are these little -> type of items that seem to make jumps to eliminate cumbersome steps. When I first started to code, I thought there should be an easier way, but then I got 'wired' into the step by step procedures. I'm still not as proficient as I'd like to be, but i think I'm improving. Perhaps one day I'll go for PDO, but for now, I need every road sign and pathway to be visible. PS: I have the same problem with JQuery.
  4. phppup

    month/date with leading zero

    Thanks requinix. I'm slapping leading zeros all over the place!!!
  5. I've got a date input from a dropdown menu and want to add a leading zero to the first 09 numbers. if(document.getElementById("month").value < 10) { ("0" + document.getElementById("month").value) = month; } Is apparently an incorrect application. I have seen ("0" + (yourDate.getMonth() + 1)).slice(-2) but cannot seem to get that working either. Please help.
  6. From an open browser window, I am using code to open 2 new tabs window.open("http://www.yahoo.com"); window.open("http://www.google.com"); They open sequentially, leaving browser tab that has GOOGLE open, active, and visible. Can I use JavaScript to indicate that I want the ORIGINAL tab to STILL be the ACTIVE window of focus?
  7. phppup

    Best approach guidance

    Thanks Barand. I was considering separating YYYY and mm/dd into separate fields. I will try your method. Obviously, I'll be doing more reading on MySQL and handling dates. Ginerjim: I'm glad I was able to enlighten you by being the first to offer a new explanation for not choosing PDO as my favorite option. My needs do not require me to integrate with other db formats, and the 'shorthand' it utilizes is less easily understood than other choices. It is not an excuse, it is my opinion; just as you have your own opinion, which appears NOT to be so humble, although you stated "IMHO". Perhaps "a re-read with comprehension" will change my mind in the future, but not this week.
  8. phppup

    Best approach guidance

    Thank you Brand to the rescue. Glad to see I was on the right track again. Now let's see how far I can take it.
  9. phppup

    Best approach guidance

    Did WE read the very first post. Maybe are-read with comprehension would help. To clarify: The SQL query would deliver it's result(s) in a format that not only provides a list of people, but ALSO ads functioning checkboxes for use as it's own form.
  10. phppup

    Best approach guidance

    PDO is my least favorite method. It is too abbreviated for me, and I get lost in its application. Also, the link does not address the initial question: what is the best way to achieve a resulting form with usable checkboxes next to each valid response to the query?
  11. phppup

    Best approach guidance

    Yes, you are correct on birthdate. It was a silly typing error. The DB is pretty well established. My thought process now is how best to implement having a query response that creates a form with usable checkboxes.
  12. phppup

    Best approach guidance

    I'm looking for some direction as I approach a new challenge. I have a table named friends_and_family and it contains name, email, and age fields. I'm planning a party and want to invite 10 of the people that are between 20 and 35 years old. The format I am considering would query the table and provide a list of those members that fit the age requirement. I would like to generate that result (which I should be capable of handling) so that each person listed has a checkbox next to their name. I imagine I will be creating a resultant form, so that I can then evaluate the result and select the checkboxes for those specific people that I want to invite. Upon submission, an email will be sent to the people with selected checkboxes. How should I approach this best? A for each loop? Implode an array? I'm not very good with AJAX, so I'm thinking along these lines.
  13. I thought it would get easier, but I was wrong. LOL Took maxxd advice and added to the top of my script, <?php $status = ""; $mail->SMTPDebug = 2; $subject = "Sending Email Using PHP Mailer"; but I didn't see any change in the Error Message which simply states: Mailer Error: SMTP connect() failed In other news, I did get a 'supposedly correct' relay-server for outgoing SMTP mail and confirmed that emails sent from my domain name are going out through that server. I was also told that NO AUTHENTICATION is required. So now the question is whether to eliminate Username and Password OR use empty quotes (as they suggested). Still struggling here. PS to requinix: YES, while testing the outbound server to confirm that my mail was sending, I tested to my cell and it did display the sender's info.
  14. If I get it working again I'll let you know. I found this sample code that is SUPPOSED to work, but something is causing it to provide: Mailer Error: SMTP connect() failed. <?php $status = ""; $subject = "Sending Email Using PHP Mailer"; $body ='<p>Congratulations!</p>'; $body .='<p>You have successfully received an email from.</p>'; // Enter Your Email Address Here To Receive Email $email_to = "my_yahoo_email@yahoo.com"; $email_from = "myTESTemail@my_domain.com"; // Enter Sender Email $sender_name = "Mister Mail"; // Enter Sender Name require("PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "mail.my_domain.com"; // Enter Your Host/Server $mail->SMTPAuth = true; $mail->Username = "myTESTemail@my_domain.com"; // Enter Sender Email $mail->Password = "theTESTpassword"; //If SMTP requires TLS encryption then remove comment from it //$mail->SMTPSecure = "tls"; $mail->Port = 25; //tried 25 and 587 $mail->IsHTML(true); $mail->From = $email_from; $mail->FromName = $sender_name; $mail->Sender = $email_from; // indicates ReturnPath header $mail->AddReplyTo($email_from, "No Reply"); // indicates ReplyTo headers $mail->Subject = $subject; $mail->Body = $body; $mail->AddAddress($email_to); // If you know receiver name using following //$mail->AddAddress($email_to, "Recepient Name"); // To send CC remove comment from below //$mail->AddCC('username@email.com', "Recepient Name"); // To send attachment remove comment from below //$mail->AddAttachment('files/readme.txt'); /* Please note file must be available on your host to be attached with this email. */ if (!$mail->Send()){ $status = "Mailer Error: " . $mail->ErrorInfo; }else{ $status = "<div style='color:#FF0000; font-size:20px; font-weight:bold;'> An email has been sent to your email address.</div>"; } ?> <html> <head> <title>Send Email in PHP Using PHPMailer - AllPHPTricks.com</title> </head> <body> <?php echo $status; ?> <br /><br /> </body> </html> Not exactly sure if it's a C-Panel email issue, or the code, or just my lack of expertise. Any suggestions for finding a solution.
  15. I'll give it a try later on. Do emails sent this way display the Yahoo information, or are the headers modified. Thanks for the help.
×

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.