Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Actually you need to do it with SQL. PHP can be used to run that SQL, but PHP isn't going to be creating tables or copying data. If the table is simple and not used frequently then you rename the table and create a new blank one. If it has things like triggers or is being used a lot then create a blank table like the old one, which I think you said you know how to do, then do an INSERT...SELECT query.
  2. How to do what, exactly? Copy the structure and data of a table to a new table?
  3. Unless I'm misunderstanding, right now what you have is, you take the current time and add 3 minutes to know when the form expires, and then later you take that time and add another 3 minutes to it? This: echo $date = date('Y-m-d H:i:s'); echo "<br>"; echo $expire_check['expired']; What was it outputting? Are the two values what you expected them to be?
  4. If you don't understand the nature of the problem then throwing random code at it will not help. Thus: My expert guidance is that you need to learn about (1) arrays and objects in JSON, (2) arrays and objects in PHP, and (3) how you mentally and programmatically translate from one to the other. Here's how you read the JSON: { "rooms_availabilities": [ // do a foreach on $request->rooms_availabilities to get { // ...a set of objects. each object has "id": 570386, // ...a ->id "days": [ // ...and a ->days, which is another array. foreach on it to get { // ...a set of objects. each object has "avail": 5, // ...a ->avail "no_ota": 1 // ...and a ->no_ota
  5. Also, note that "" and "0" are both considered empty().
  6. sigh This is why you don't disable UAC if you don't know what you're doing with your own computer, and why you don't blindly click Yes every time it pops up a message unless you know exactly what is you've asked it to do. My first guess is you downloaded a bad version of XAMPP, or else it was something else you downloaded and ran. Have you tried running the general malware removal tool that Microsoft regularly publishes?
  7. Don't try to handle each image individually. Reserve a number range for your batch of files in a single statement, then use the numbers from that range when you move the files around.
  8. Is that message coming from AVG? Do you trust AVG to be accurately reporting problems that it detects? https://www.google.com/search?q=win32%3Akadrbot
  9. If UUIDs aren't unique enough, then what's so special about the table name to make it so?
  10. Unless you're saying that the endianness in the file varies then all you have to do (for my code) is make sure you use the format codes which specifically say little/big endian. If it does vary in the file, which is possible, then it's probably according to your system, in which case you very likely just use the system-dependent formatters instead.
  11. Take a look at what's happening with the data. Match up the expected values with the actual values... You can keep the C16 but you'll have to piece together the hashes in a different order than 1-16.
  12. No, not your whole computer. MySQL. I say "safe mode" but that's not the actual term. Just do what the instructions in that page I linked earlier say - except, of course, your problem is unlocking the account, not resetting the password. Because MySQL gets installed on Windows just about the same way regardless of whether you use XAMPP or not.
  13. The one helpful part missing from your post is stating what the correct values are supposed to be. Because e484d857-00b7-4107-a58a-36ff29f6a3a5 looks like a correct GUID to me. Typically, though, one deals with binary file data by reading an entire "block" of stuff at once and then unpacking it. $data = fread($handle, 52); print_r(unpack("C4header/vversion/vlicense/v2flags/Vnames/Vnameoffset/Vfiles/Vfileoffset/Vtypes/Vtypeoffset/C16guid", $data)); Array ( [header1] => 193 [header2] => 131 [header3] => 42 [header4] => 158 [version] => 127 [license] => 29 [flags1] => 33 [flags2] => 0 [names] => 31 [nameoffset] => 72 [files] => 7 [fileoffset] => 753 [types] => 6 [typeoffset] => 711 [guid1] => 228 [guid2] => 132 [guid3] => 216 [guid4] => 87 [guid5] => 0 [guid6] => 183 [guid7] => 65 [guid8] => 7 [guid9] => 165 [guid10] => 138 [guid11] => 54 [guid12] => 255 [guid13] => 41 [guid14] => 246 [guid15] => 163 [guid16] => 165 )
  14. Whether you don't have the password or the account is locked, either way you cannot get into it. Restart in safe mode, unlock the account manually, then restart in regular mode. I don't know if XAMPP gives you a way to restart in safe mode.
  15. Restart MySQL in safe mode without user authentication, reset the root password/unlock the account, then restart back in regular mode. https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
  16. Your question doesn't make sense. It sounds like you're starting with a database that's configured for SSL connections, and now you're trying to find applications to make use of that?
  17. Your query will return two colors. There's no way for you to know which color belonged to which flower. Or whether there were multiple rows for a given flower. You're starting with a list of flowers, right? SELECT flower, color FROM prettyflowers WHERE flower IN ('rose', 'carnation', 'orchid', 'tulip'); That will give you the list of colors but also their matching flowers. I don't know what you want to do after this, but while you go the that set of results, you can remove the flower from the list you started with. So you'll find a row of rose/red and orchid/purple, remove those from your list of flowers, and end up with carnation and tulip.
  18. And what is your question?
  19. Any $_POST data you would be able to see in your browser's developer console where it handles network monitoring. Pull that up, run your script, and see what is or isn't being sent in the requests.
  20. The "common solution" would be to fix whatever incorrect configuration you have. But it's hard to know exactly what part is incorrect by guessing. You also apparently have some setup where you can simply "change" how PHP is running, and if you can "enable SEO friendly URLs" then there's some application involved that you haven't mentioned. So. What is your setup?
  21. "Session variables" isn't a language. The choice is not "session variables instead of PHP" or "session variables instead of Javascript". The choice isn't even "PHP or Javascript". The choice is "session variables or data in the request". As in you can decide to put page information into the session or you can put page information into the URL. And the latter is better.
  22. Is it me or are you doing pagination using session variables?
  23. The error message is telling you that the first character in the "JSON" is a less-than. You know, like the kind used by HTML? Doesn't that make you wonder what the "JSON" you expected to see, actually was?
  24. If you want something to change on the page after the user has loaded it, and without the user having to do anything like reload the page, then you have to use Javascript.
×
×
  • 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.