Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Content Count

    5208
  • Joined

  • Last visited

  • Days Won

    143

Larry last won the day on July 9

Larry had the most liked content!

Community Reputation

422 Excellent

About Larry

  • Rank
    Administrator/Writer

Recent Profile Visitors

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

  1. Ah, cool! And thanks for sharing your learning experience. If it helps, I still make dumb mistakes, too.
  2. I'd check the registration date. It's likely that multiple records have the same value there if they were created by a mass import.
  3. Ah, sorry about that but kudos for figuring it out and thanks for letting me know!
  4. This kind of problem is a PITA to debug b/c it could come from several places: the value stored in the database, the value retrieved from the database, the value put into the HTML, or the value displayed in the browser. I don't think you want to go to some converter method; it's best to solve the actual problem. I'd start by confirming how the values are stored in the database. Make sure the database is using UTF8 everywhere, especially on the specific table and column. Make sure you're using UTF8 when connecting to the database, both directly and from PHP. And then make sure your HTML page uses UTF8, both in the HTML encoding and in the encoding used by your IDE/text editor when saving the file.
  5. Sorry about the delay and thanks for reminding me! The solution here isn't immediately obvious so I had to hunt around a bit. It looks like the write session function is what comes into play here (per the PHP manual), but that method returns true, assuming we're looking at the same script. This is a wild guess, but does it get fixed if the close session function is changed to mysqli_close($sdbc); return true;
  6. I don't know the answer to this one off the top of my head. You might be able to use imagmagick or gimp? I really don't know whether this would qualify as OCR or not? I imagine you'll need to find some software that runs on the server that can do the work, then upload the image via PHP and call the software via PHP through an exec() command. None of this would be easy or obvious. If you already have a JS library that works for the reading of the image, can't you just have JS do the math, too?
  7. I'm not quite following the use case here (why you'd update a table to an auto-increment value) but, more importantly, this isn't a prepared statement? Could you provide a bit more code? Also, when you say you're having a problem, what is happening that shouldn't? Are you seeing any error messages?
  8. The header.html file is going to be included from another script, so the reference to mysqli_connect.php needs to be correct relative to that parent script. That parent script should be in the htdocs folder, so ../mysqli_connect.php should be correct (if it's in the xampp folder).
  9. Okay, that makes sense. If you're running an HTML script directly, then PHP code in that script won't be executed. You should instead be running the PHP script that includes the header file.
  10. To clarify, the chard ID is not the same as the token. The token is the representation of the payment method, which is used to create a charge. As for not seeing the charges in the Dashboard, you are looking at test data, which should show the results. I'd look at the logs in the Dashboard to see if requests are being made and also confirm you're using the right API keys.
  11. What do you mean by "when you run the script"? What script are you running? Or, better yet, what URL are you using when you see that result?
  12. Hmmm... your visible tab title there makes me wonder if there's not actually an HTML problem that's at the root here. I'd look for that first. If that's not it, if I recall correctly this chapter probably does an HTML index version first. I'd confirm whether or not that's rendering properly.
  13. I expect the problem is you CANNOT test from localhost without SSL. If you use Let's Encrypt, you can get a free, legit certificate to use for testing purposes.
  14. Ah, okay. Kudos for figuring it out and thanks for letting us know!
×
×
  • Create New...