Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by AyKay47

  1. What debugging steps have you taken? Make sure error_reporting is set to E_ALL or -1 and display_errors is set to ON or 1 It may help to post the form
  2. If you are not sure what ChristianF is talking about, try googling "MVC Framework".
  3. 1. str_ireplace requires a string for the first parameter, not a string format. 2. Generate the URL inside of the while loop, $E_ID contains the last value from the database.
  4. Wasn't a core function, there are custom functions floating around that will do it.
  5. There is no core PHP function that will do the entire process for you.
  6. My guess would be the "@" symbol in the password is throwing it off. I don't know the specifics of what exactly causes this, but there has been bug report(s) on it. Try changing the password for that user to a simple string and see if that works.
  7. $_SERVER['PHP_SELF'] should never be used as a forms action, as it can rather easily be spoofed. Instead if you want the form to submit to itself, use action=''
  8. All that should need to be passed is the id, and I do not see why that would need to be hidden or encrypted.
  9. If you output: echo "<pre>"; print_r($cdata); echo "</pre>"; You will get a better idea of the array structure.
  10. What exactly do you mean? PHP code can only be interpreted in a php file. Mod_rewrite would allow you to change the PHP file to look like an HTML file in the URL, which addresses your initial question.
  11. How is the array being generated? Post the relevant code to this thread.
  12. change the query to: SELECT id FROM TABLENAME WHERE username='USER' AND password='PASSWORD' LIMIT 1 Again, single quotes can only be used a qualifiers is you configure the mysql server to accept them.
  13. Place the MySQL debugging code in the login.php page and display the error(s) received. The MD5 comment applies to the entire application.
  14. try foreach($_POST['calltotor'] as $toractions) { if(array_key_exists($toractions, $callstoaction)) echo $callstoaction[$toractions] . "<br>"; }
  15. Also, arbitrary user input data should not be inserted directly into an SQL statement. Make sure to mysql_real_escape_string the data before using it in an SQL statement. However, in this particular case since the value is an expected integer, casting the value to an (int) or using intval is sufficient.
  16. Unless you have mysql enabled to allow single quotes as qualifiers, that syntax is incorrect. Proper MySQL debugging should be implemented: $r = mysql_query($q) or die("Error: " . mysql_error() . "<br>Query: " . $q); 1. $errorMsg is not output anywhere in the script, nor is script execution discontinued when an error occurs. 2. Using an MD5 hash on passwords is simply not enough, as it is simple enough to crack an MD5 hashed value using brute force methods. Instead, I recommend using the crypt function with a compatible salt.
  17. Change the error handling a bit so you can see the actual statement: $Result1 = mysql_query($insertSQL, $racc) or die("Error: " . mysql_error() . "<br>Query: " . $insertSQL); and display the results of the above. Also, if you are expecting committee_id and member_id to contain integers, %d instead of %s should be passed to printf()
  18. The image is being stored as a BLOB, so you need to base64 encode it and insert it into an <img> tag: echo "<img src='data:image/jpeg;base64," . base64_encode($row['image']) . "' />";
  19. Dividing 0 by anything is 0, dividing by zero is undefined/error?
  20. Right, but since this topic is in the context of OOP, we are talking about OOP MVC which is a little more difficult to implement correctly.
  21. The thing with OOP is, it requires more resources to run and is much more time consuming then procedural. While I always want to use OOP for every project I gain, there are some that just don't warrant the time to do so. It's a case by case sort of deal.
  22. No offense, but if you have not yet grasped OOP, I sincerely doubt that you have grasped MVC to its full potential. There is no simple answer to this that will be 100% correct without going into vast detail.
  • 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.