Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by justsomeguy

  1. It sounds like you need to set the character set to utf8 in MySQL.
  2. OK, isn't that what the example that you linked to on w3schools shows?
  3. Can you describe the situation with a little more detail?
  4. I'm not sure I understand, you said you want to show more in the same screen but you can only create it in the same screen?
  5. justsomeguy

    Query Help

    I don't know of a way to do that with a query. I think you need a stored procedure or you get all of the relevant data and then process it with another language on the server. Maybe there's a way to do it with a basic query, but it would be pretty complex and I'm not sure how you'd go about it.
  6. https://www.php.net/manual/en/migration70.php
  7. You can use the various get methods of the Date object to return the various parts and put them together however you'd like: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
  8. For whatever reason the filename you're sending to getimagesize is empty. If you copied that code without changing it then that could mean the file was too large. The code they have doesn't really do any error checking.
  9. You should validate the number. Since all data on a page is a string, you can use parseInt to get an integer from what they entered and use isNaN to validate that it converted correctly.
  10. It looks like there are several jQuery highlighting plugins: https://www.sitepoint.com/10-jquery-text-highlighter-plugins/
  11. You would have to save the state in something like localStorage or using cookies, and when the page loads you check for that saved state information and apply it to the page.
  12. Are you uploading that file to a web server and accessing it over HTTP?
  13. You would only have a list of keys, you wouldn't know which level they're at. If there are duplicate keys you wouldn't know either. If you want to do that though, why is not using recursion a requirement?
  14. I would start the counter at the original date 29 years ago instead of 2018. Then you can use the code above. You can get the years and display that in one place, and display the rest of the info somewhere else if you want.
  15. Is Inmotion your host? I've never set up htaccess to use a proxy at all, I didn't even realize that was an option frankly. Regardless, if the URL is changing then it sounds like it's not even using that rule. I can't say why, because I'm not sitting there watching you, but maybe there is another rule. Do you have anything else in htaccess? Is your site set up to look at the domain and redirect to another one? Is it? Go through that pattern and tell me what each part means. Also tell me why you're using a replacement for the domain name, and what that replacement is going to be.
  16. Are you using mod_proxy? Why do you have it using a proxy to do that? Is there anything else that might do the redirect? Maybe the page itself is redirecting?
  17. I don't think you can do that with a basic query, maybe a stored procedure would work or else you would need to get all of the results and use another language to go through the data.
  18. Did you save the old position number somewhere else? You can't sort by data that doesn't exist.
  19. justsomeguy

    JCabral

    You didn't say which database you're using, but at least in MySQL if you make that field an enum field, and define the values in the order in which you want them listed, then that's the order if you sort by that field.
  20. You need a rewrite rule to redirect that subdomain or any subdomain to the other URL. You also need to set up DNS for the subdomain.
  21. You can just change the elements that have the "nested" class to "active".
  22. Have you looked at any of their documentation at all? https://developers.google.com/youtube/ https://developers.google.com/youtube/documentation/ https://developers.google.com/youtube/player_parameters https://developers.google.com/youtube/v3/getting-started If you can't find what you're looking for there, then maybe YouTube doesn't allow it. If they don't allow it, then you need to write software to take a YouTube URL, get the video content, and write it to a file. If you don't know how to do any of that, then why are you trying to build a site to do it? You'll need to learn whatever you don't already know.
  23. I don't think you've posted enough code. If the function name is accurate, XOR is not encryption.
  24. Look at YouTube's documentation. If other sites are doing it then obviously there's a way to do it. Start with their documentation to see what's available.
  25. The echo statement is how you send output to the web browser in PHP. It's not the only way, but it's common. Look at the died function, it uses echo to send messages to the browser. You use the same method to send HTML, it's all output that goes to the browser. You can also end the PHP code, output whatever you want, and then start PHP again. e.g.: php code here ?> <!-- send output --> <!doctype> <html> <head> ... </head> <body> <?php // start PHP again Anything outside of PHP tags is considered to be output that is just sent to the browser.
×
×
  • Create New...