Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Necuima last won the day on April 24

Necuima had the most liked content!

Community Reputation

18 Good

About Necuima

  • Rank
    Advanced Member

Recent Profile Visitors

1558 profile views
  1. OK, if you look in "browse" for the PHP6 book it is the latest post in that topic. Sorry, it is under my name.
  2. It looks like you have created the database but have you created the tables? Cheers, Necuima
  3. 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
  4. Re reading a PDF - you could have a look at: https://www.pdfparser.org/ but I have not used it. Cheers
  5. Hi Jai, Mr Ullman has a great book on e-commerce - "Effortless E-Commerce" - 2nd edition with PHP and MySQL. Cheers
  6. Hi, I am sorry but I don't think that I can help you with this but I did notice "Username and Password not accepted" - did you check out the link at the end of that message? I use my Internet login details with my service provider and have never had a problem. These details may or may not be the same as your email address. Hope it helps.
  7. I do not use a proxy server. And my statement that you need to be logged in to your email service may be a bit mis-leading. You need to be logged in to the Internet with your service provider.
  8. Ok, the following is how I send emails from PHP. Uses PHPMailer. In XAMPP you need to tell it where your normal email connection is. $host = substr($_SERVER['HTTP_HOST'], 0, 5); if (in_array($host, array('127.0', '192.1', 'local'))) { $local = TRUE; // echo "Local is true, HOST is $host"; } else { $local = FALSE; // echo "Local is false, HOST is $host"; } if ($local) { // tests for using XAMPP locally ini_set('sendmail_from', 'your email address'); // needed for Win 10 localhost (Development) ini_set('SMTP', 'your email service SMTP server'); // needed for Win 10 localhost (Developmemt) } require './includes/PHPMailer/PHPMailerAutoload.php'; // available as a free download $mail = new PHPMailer(true); $mail->setFrom(EMAIL, 'Whoever'); $mail->addAddress(EMAIL, 'Whoeverr'); if ($local) $mail->Subject = 'The email subject'; else $mail->Subject = 'The email subject'; $mail->Body = 'The email body'; $mail->addAttachment($report_file); // optional if(!$mail->send()) { echo '<p>Message was not sent.</p>'; echo '<p>Mailer error: ' . $mail->ErrorInfo . '</p>'; } The EMAIL constant has the email address that I want to show the email was sent from/to - in this case the receiver and the sender are the same email address - just change them to whatever you want to use. Hope it helps. P.S., assumes that you are logged in to your email service. PPSS, I use PHPMailer as it lets you attach a file to an email if you want/need to.
  9. There is also a similar example in detail using jQuery in the book "JQuery in Action, 2nd Edition" chapter 8.
  10. OK, I'll use the timestamp approach. Thanks for the advice. Cheers, Necuima
  11. Hi Larry, I finally got to the point in my complete software re-load/re-build where I could test your suggestion. I re-downloaded the script from your website and made the suggested change but unfortunately I am still getting the error "on line 29: session_write_close(): Session callback expects true/false return". Here is my modified code: // Define the close_session() function: // This function takes no arguments. // This function closes the database connection. function close_session() { global $sdbc; mysqli_close($sdbc); return true; // return mysqli_close($sdbc); } // End of close_session() function. My environment is XAMPP 7.3.5 with PHP 7.3.5 both 64 bit under Windows 10 (64 bit). I know that you are a very busy man so please treat this as low priority - I will use a work-around. Best regards, Necuima.
  • Create New...