Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Implied in my "there is no magic script" comment is that you will undoubtedly have to make some changes to anything you may find. Changes such as using your hashing algorithm (salted SHA512 I assume?) instead of whatever the author put in. At a minimum: 1. Generate a reset code and store that somewhere 2. Send the user an email with the code 3. Email has a link to an SSLed page where they (manually) enter their email address and the code 4. If correct, let them change their password There are plenty of things out there that have one or more of those pieces: a reset code is basically just a password salt (except typeable), emails are covered to death, and changing the password is an UPDATE query.
  2. By not "send[ing] the user to another page and then to index.php". As in don't do the redirect you apparently have in place right now. Without the redirect the page will load again. Just make sure this "action" thing doesn't get set, whatever that means.
  3. It depends how your system works now: where information is store, how information is stored, whether you need to verify the user before resetting, whether you should send an email to reset rather than reset and email them the new password... There is no magic "reset password script" you can just download from the intertubes and drop into your site.
  4. What you have now looks at things that happened after a day ago. What you need is to look at things that happened after two days ago and before one day ago. Convert that pretty much literally into SQL.
  5. You're not using document.cookie correctly. document.cookie
  6. You don't get that information, but you do get a copy of the file itself (after it's been uploaded to a temporary directory on your server). You would then want to read its contents to grab whatever information you need. File uploads
  7. You cannot show an image and redirect at the same time. For one, it doesn't make sense: if you're redirecting then the user won't get a chance to see the image, and if you want them to see the image then why are you redirecting them away from it?
  8. Well, "Education" certainly won't match against "\d+"...
  9. It will only do the current year. Why do you say it has values from 2013?
  10. What URL are you trying to access and how does it "not work"?
  11. When you execute a SQL command all you're doing is sending it to the MySQL server. The client isn't parsing the query looking for LOAD_FILE()s so that it can translate the file path you gave. Try an absolute path.
  12. There's another layer in there you aren't accounting for: $json_output = { status: ok, ...} $json_output->data = { 502438129: [...] } $json_output->data->{"502438129"} = [ { ... } ] $json_output->data->{"502438129"}[0] = { achievements: ... } $json_output->data->{"502438129"}[0]->achievements = { medal_dumitru: 0 }
  13. sqrt? What don't you understand? It's an equation. Translate that equation into code and you'll get your answer.
  14. Don't know what you did but it definitely does exist.
  15. You told it to UPDATE jobs SET sent='0'What did you expect? That it magically knew you didn't want every row to be changed? You need a WHERE clause in there to identify which particular row you want to update.
  16. Make sure you have error_reporting = -1 display_errors = onin your php.ini (change and restart if not). Then look for error messages. If you don't see anything then the problem might lie in index.php's code...
  17. Not quite: it shows the function being called twice, with the first time working SELECT `user_id`, `username`, `password`, `email`, `gender`, `country`, `month`, `day`, `year`, `pass_recover`, `type` FROM `users` WHERE `user_id` = 1279 Resource id #9 Array ( [user_id] => 1279 [username] => admin00100 [password] => 53dd9c6005f3cdfc5a69c5c07388016d [email] => admin@admin.com [gender] => m [country] => AF [month] => 1 [day] => 1 [year] => 2005 [pass_recover] => 0 [type] => 0 )and the second time failing SELECT `username`, `email`, `gender`, `country`, `month`, `date`, `year` FROM `users` WHERE `user_id` = 1279 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/justin/public_html/core/functions/users.php on line 156As for the problem, are you sure the field is called "date" and not "day"?
  18. Eh, I tricked myself into thinking too literally. I was actually talking about $var = "array[]"; $before = get_defined_vars(); $$var = 123; $after = get_defined_vars(); print_r(array_diff($after, $before)); Array ( [array[]] => 123 )
  19. Because it'll try to create a variable named "array[]". With the brackets.
  20. Try the date function: first argument is how you want the date formatted, second is the value from filemtime(). Also, if($pathinfo['extension'] != 'php, ink')The extension is either "php" or "inc". Right now you're checking if the extension is not "php, ink" (as in the file is script.php, ink).
  21. Plus variable variables won't work if you try to put arrays into your fields, such as with
  22. Take a look at the comments in the code you yourself posted: // Access the $_FILES global variable for this specific file being uploaded // and create local PHP variables from the $_FILES array of information
  23. Uh huh. Uh huh. Uh huh. Not a clue.
  24. If you have to worry about other devs mucking around with your workspace then you need to find a different job.
×
×
  • 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.