Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Content Count

    5200
  • 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. 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.
  2. 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.
  3. 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?
  4. 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.
  5. 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.
  6. Ah, okay. Kudos for figuring it out and thanks for letting us know!
  7. I forget if I have examples of this in the book--I suspect I do--but here's an explanation of options for you that should work: https://stackoverflow.com/questions/11693234/php-mysql-gets-value-of-out-parameter-from-a-stored-procedure
  8. If you look at the SQL chapters you'll see examples of how to do fulltext searches in MySQL.
  9. Thanks for reporting that! I'll have the publisher fix it.
  10. Yes, more or less. You'll want to change your naming scheme so that each row of input--which becomes a database row--ends up as part of the same array in PHP. You'll need to play around with what works, but if you do var_dump($_POST) in the PHP code that may help you understand what's coming in from the form.
  11. This is very good detective work and thanks for being so thorough. I'd start by ruling out cases 3 & 4, though. The links are going to come through with HTML entity versions, so %26. You'll never have & in the URL, so there's no need to test and handle that. I'm also not inclined to go to zero-width positive lookahead assertions; that'd probably just complicate things. I just did an online regex tester for case 2 and it matched the percent okay: https://regex101.com/r/AWJdX3/1/ Are you restarting Apache after making changes to the configuration?
  12. Okay, so this kind of thing is a bit tricky. Since you have multiple inputs that are all arrays of related records, I'd start by changing your naming scheme to make them all more overtly related. For example, you'd want exams[X][subject] and exams[X][grade]. If i'm following you on this. I'm not sure I am 100%. But the key is to make the association of the data overt like that. Let me know if it's still unclear.
  13. The browser just isn't finding the CSS file, which means the HTML reference to it doesn't match where the file actually is. Do you have a CSS folder with the correct CSS files in there? Like this: https://github.com/LarryUllman/phpvqs-5ed/tree/master/08
×
×
  • Create New...