Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by phppup

  1. 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.



  2. 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.


  3. 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?


  4. 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.



  5. I thought it would get easier, but I was wrong.  LOL

    Took maxxd advice and added to the top of my script,

    $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.



  6. 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.

    $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
    $mail = new PHPMailer();
    $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->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;
    // 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
    Please note file must be available on your
    host to be attached with this email.
    if (!$mail->Send()){
    	$status = "Mailer Error: " . $mail->ErrorInfo;
    	$status = "<div style='color:#FF0000; font-size:20px; font-weight:bold;'>
    	An email has been sent to your email address.</div>";
    <title>Send Email in PHP Using PHPMailer - AllPHPTricks.com</title>
    <?php echo $status; ?>
    <br /><br />

    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.

  7. Sorry, but I did immediately make the change that you suggested.  I just didn't convert it properly when cutting and pasting from the previous post.

    In fact, I agree with your appraisal and had experienced getting caught by those filters before.

    At this point I have used both my Yahoo addresses and my me@mydomainname.com and gotten similar results.

    The regular email (when not intercepted by spam filter) arrived in my inbox, but not a single text message has arrived on my phone via MetroPCS (except for an initial test sent directly from my Yahoo account, but not through PHP mail).



  8. Sent identical messages: one to email, another to cellphone.  Only received the email.  So I guess this proves (barring any code to provide support) that the email function is sending outbound messages.

     mail( '1231231234@mymetropcs.com', "How are you", "Your packaged has arrived!", "From: Me <MyOtherEmail@yahoo.com>\r\n");
        mail( 'myemail@yahoo.com', "How are you", "Your packaged has arrived!", "From: Me <MyOtherEmail@yahoo.com>\r\n");

    Are there any new issues with MetroPCS since they merged with T-Mobile in the USA?

    (MetroPCS personnel are essentially worthless in this matter.)

  9. I have an old script for sending a text message to cellphone via PHP mail.

    The script has not changed in a year, and it did work approximately 9 months ago.

    Now, after dusting off the script and trying it, no message is received on the cellphone.

    When sent directly from my email account to 1231231234@mymetropcs.com, a text message arrives nearly immediately.

    But when sent through my email server script, even as a simplified test script

     mail( '1231231234@mymetropcs.com', "How are you", "Your packaged has arrived!", "From: Me <MyEmail@yahoo.com>\r\n");
    //OR even  mail( '1231231234@mymetropcs.com', "", "Your packaged has arrived!", "From: Me <MyEmail@yahoo.com>\r\n");

    there is still nothing received on cellphone.

    How can I resolve this?

    Are there anti-spam filters generally in place and how can I overcome them?

    Is there a way to validate that the message I am sending is actually leaving the server?

    Or are there settings [there were none before and normal email messages are sent without any problems] that need to be adjusted to send a text message?

    Thanks for the help.

  10. I have a simple ALERT that will NOT display a phrase that contains a space between words.

    I've tried OnClick and OnMouseOve, but the result is the same.

    onmouseover=alert('HelloBoysandGirls');  //works fine as a pop-up
    onmouseover=alert('Hello evrybody');   //refuses to operate

    Solution? Reason?

  11. I am trying to implement a CONFIRMATION dialogue box before the processing of a form.

    The dialogue box uses some variables from a previous script, so it seems that calling the confirmation box needs to be done through a function. And it seems that using a function to address the "action" is a tiny bit more complicated than just slapping a confirmation into the element.

    My issue at this point is an inability to direct to the processing.php page

    function confirm()  {
    if(confirm("Are you sure you want to do this with $blah1 $blah2 $blah3 )== true)  {
    window.location.href = "https://www.example.com";        //would actually be "processing.php"
    } else {
    return false;

    The browser shows an indication of 'thought' but will not advance to the next page (or an error page) - it simply refreshes.

    Oddly, when I modified the end of the script to say this, it seemed to work

    } else {
    return false;

    (but I don't understand why).

    Answers? Solutions? Remedies? Explanations?  Please enlighten me.


  12. I am using this code to evaluate whether checkboxes within a group have been selected:

        function IsChecked($chkname,$value)
                foreach($_POST[$chkname] as $chkval)
                    if($chkval == $value)
                        return true;
            return false;

    Now, I've decided that I want to add a message upon finding NO SELECTED checkbox items, but it is not functioning as desired.

    	    echo("You didn't select any checkboxes.");        

    How can I get this or something similar to trigger?

  13. Not having much luck with double quotes inside the double quotes.  It seems as though the script is interpreting the second double quotes as the end of the statement rather than a continuation.

    Am I missing some sort of syntax rule? Is there a requirement of double-single-double (or similar) in order to work along those lines?

  14. It would be GREAT if someone could provide some specific structural info for this:

    I have one checkbox each for Moe, Larry, and Curly respectively.  I have managed to assemble code that allows for each of their names:

    $sql="INSERT INTO $table (first_name) VALUES...

    It works great INDIVIDUALLY.  But I want to be able to insert any combination into the $table by checking the respective checkboxes and submitting the form.

    It seems that initiating more than a single INSERT will not get the job done, and separating the values as variables hasn't worked either.

    What is required?  Can you offer an 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.