Jai Posted April 18, 2020 Share Posted April 18, 2020 Hello, i have been studying this book "php 6 and mysql 5 for dynamic website" on my own... i am happy i finished studying this book and this gave me an advanced basic understanding in PHP and MYSQL. Please i will like some recommendations on which php and mysql book to study/buy next in order to have more advanced knowledge in php and mysql. So as to be able to create a section in my web application to read pdf files. And also to be able to create an e-commerce application. Thank you, Jai. Link to comment Share on other sites More sharing options...
Necuima Posted April 19, 2020 Share Posted April 19, 2020 Hi Jai, Mr Ullman has a great book on e-commerce - "Effortless E-Commerce" - 2nd edition with PHP and MySQL. Cheers 1 Link to comment Share on other sites More sharing options...
Necuima Posted April 19, 2020 Share Posted April 19, 2020 Re reading a PDF - you could have a look at: https://www.pdfparser.org/ but I have not used it. Cheers 1 Link to comment Share on other sites More sharing options...
Larry Posted April 22, 2020 Share Posted April 22, 2020 Thanks for the interest in more books! Much appreciated! The "PHP Advanced" book would be the logical one after "PHP & MySQL". Or the e-commerce book that Necuima recommended. 1 Link to comment Share on other sites More sharing options...
Jai Posted April 24, 2020 Author Share Posted April 24, 2020 Thank you for the assistance Link to comment Share on other sites More sharing options...
Jai Posted April 24, 2020 Author Share Posted April 24, 2020 Necuima, I finally succeeded in using PHPmailer, i ll find a day to post about the success. Thank you Yours sincerely, Jai. Link to comment Share on other sites More sharing options...
Necuima Posted April 27, 2020 Share Posted April 27, 2020 Really glad to hear this. What was the issue? Necuima Link to comment Share on other sites More sharing options...
Jai Posted May 9, 2020 Author Share Posted May 9, 2020 I figured out.. that to use phpmailer, the class had to be defined first(i.e. immediately after the opening php tag) before any line of code. The mistake i did when trying to use it before was; i included the class only within the body of my script when the code for the message section was written which then threw the exception (UNCAUGHT ERROR ;PHPMAILER CLASS NOT FOUND). So in order to use the phpmailer to send email from a particular script, I did as this: <?php //define the phpmailer class use PHPMAILER\PHPMAILER\PHPMAILER; use PHPMAILER\PHPMAILER\Exception; /* here comes the code for the script, for instance including a script, validating the form, checking if the form has been submitted, submitting and whatever.. */ /* After wriiting all the codes above, the section of code which should send the mail is the phpmailer body with my credentials for authentication. */ require 'absolute path to the autoload.php file'; $mail = new PHPMailer(TRUE); try { $mail->setFrom('email@example.com', 'optional'); $mail->addAddress($trimmed['email'], $trimmed['first_name']); $mail->Subject = 'Subject'; $mail->Body = $body(comes from the lines of codes written above before this section of codes); /* SMTP parameters. */ /* Tells PHPMailer to use SMTP. */ $mail->isSMTP(); /* SMTP server address. */ $mail->Host = 'smtp.gmail.com'; /* Use SMTP authentication. */ $mail->SMTPAuth = TRUE; /* Set the encryption system. */ $mail->SMTPSecure = 'tls'; /* SMTP authentication username. */ $mail->Username = 'email address to be use to send the mail to other email addresses'; /* SMTP authentication password. */ $mail->Password = 'password of email address used to send the mail to other email addresses'; /* Set the SMTP port. */ $mail->Port = 587; /* Finally send the mail. */ $mail->send(); } catch (Exception $e) { echo $e->errorMessage(); } catch (\Exception $e) { echo $e->getMessage(); } // finish the page echo '<h3>A message to confirm that the mail was sent.</h3>'; include('includes/footer.html'); exit(); NOTE: I HAD TO TURN ON LESS SECURE APPS PERMISSION FOR THE GMAIL ACCOUNT WHICH IS USED TO SEND EMAILS TO OTHER EMAIL ADDRESSES. NOT TURNING ON LESS SECURE APPS FOR THE RECIPIENTS ACCOUNT Link to comment Share on other sites More sharing options...
Jai Posted May 9, 2020 Author Share Posted May 9, 2020 Thanks once more Necuima. yours sincerely, Jai. Link to comment Share on other sites More sharing options...
Necuima Posted May 11, 2020 Share Posted May 11, 2020 So glad that you got it to work for you. As mentioned, it has always worked flawlessly for me, both in my development environment and in production. Best wishes, Necuima Link to comment Share on other sites More sharing options...
Recommended Posts