Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


maxxd last won the day on October 30

maxxd had the most liked content!

Community Reputation

72 Excellent

About maxxd

  • Rank
    Prolific Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location
    North Carolina

Recent Profile Visitors

13,250 profile views
  1. What exactly do you need? You said you fixed it...
  2. Or use AJAX. Depends on what you're trying to accomplish and how you're trying to accomplish it. As far as the security goes, no matter what you do that part's going to be up to you, and I'd recommend not just blindly copy/pasting code from the internet in this situation.
  3. Which file(s)? The only issues I've really run into with PHPMailer involved incorrect email addresses and authentication issues, so I'd be interested to know. Also, make sure there's been an issue submitted to the repo if there's an error in the code.
  4. If it's set up in the image you could use exif_read_data() to grab comment metadata and output that as the caption.
  5. I totally get that, but there's really not a more elegant way to handle this situation that I can think of off the top of my head - maybe someone else can pop in with a suggestion.
  6. In the second code block, you're only running the readdir() once, so as long as it's not false on the initial run, it never will be.
  7. I can't see where $ranges is defined, so once you define $two_letter_country_code you may have another undefined variable error unless it's defined in "ip_files/".$numbers[0].".php".
  8. When I asked you to post the code, I meant for you to post the code that's actually being run. You mention a 'first' script that you don't show us, and then talk about what doesn't happen when you "combine" that script with what you do show. How are you combining the scripts? What does the resulting script look like? Right now you're asking us to tell you why your shower isn't working by telling us you have a bathroom.
  9. Sorry - bit confused here. Are you saying that if you've already submitted the form and then you run JavaScript replaceState it doesn't resubmit your data? I'm sure someone will correct me if I'm mistaken, but I believe that replaceState() won't actually redirect or refresh your browser - it just tells the browser history object where it thinks it's been or where it thinks it currently is. If you're trying to actually reload the current page, maybe window.location.reload()?
  10. You're going to have to post your code. PHP inside HTML may not be the best idea in the world, but it works pretty flawlessly assuming everything is done correctly. My bet is that if your JavaScript stopped working, something didn't get named what it is later called and the error is pretty standard once you see it. As far as which should be done first (PHP/HTML/JavaScript), if you're determined to combine PHP and HTML, put the PHP code first. Deal with any form handling, collate the page variables, and deal with the system business logic, then render the HTML display. Keep your JavaScript entirely separate from all of that so that you can minimize and uglify it via webpack or gulp. This will at least get you a step or two closer to true separation of concerns, and that'll save you refactoring time in the future. Oh - and a form action is "run" when the form is submitted. Nothing's actually run as such, the browser redirects to the page named in the form's action property and passes the data from the form to the page via either $_GET or $_POST, depending on the method attribute of the forms.
  11. OK - I assume the 'installation & loading' section of the readme got you sorted? Ask any questions you've got on it here, but I can almost guarantee that you'll have a much, much better experience using PHPMailer than you've had using PHP's native mail() function.
  12. Or $_POST or $_GET as well as the WHERE clause; the important part here is that you're gonna need a WHERE clause in your SQL statement.
  13. OK - this is not a session problem, it's a problem of not understanding variables or SQL. Your SQL statement is currently looping through every record in the table and saying 'update the current record if the ID value of the current record is equal to the ID of the current record'. Which, as Barand pointed out, will always be true. So if you're wanting to only update one specific record at a time, you'll have to get the user_id of the specific record you want to update and then assign that value to a php variable (which begins with a dollar sign), which you will then use as the value of `user_id` in the WHERE clause.
  • 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.