Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. if (empty($array)) { echo 'The array named $array is empty'; }
  2. It is possible, but considering php is a server side language, it has nothing at all to do with php. http://www.google.com.au/search?q=css+embedded+fonts
  3. MD5 is a mysql function. http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html#function_md5
  4. I can only assume it was Eric who made these changes / restarted MySQL. I haven't logged in for a few days.
  5. The amount of file processing your likely to need to do this is very likely to out way the processing of simply querying a database.
  6. Well, without seeing that relevant code we can't help anymore except to reiterate what the error says which is that the generateRandID() method is not part of the Session object. Instead of.... function Session() { .... } You would use.... function __construct() { ... }
  7. You don't want to store all the values in one record within the database, that would be a poor design decision. Instead, each of these values should have there own row. You can then use another items 'id' to relate them if need be.
  8. Do I have an example? The link I gave you has plenty of examples, and explains what arguments the function accepts as well as what it returns. Your post above uses the system function, which can also execute external programs. Read the manual, it is the definitive guide.
  9. Just loop through the array and store each value as you go.
  10. trq

    Hotlinking

    Something like.... RewriteEngine on RewriteCond %{HTTP_REFERER} !domain\.com [NC] RewriteRule \.(jpe?g|gif|png)$ - [F,NC]
  11. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=311716.0
  12. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=311671.0
  13. I would suggest that whoever you hired was crap. I've not done any WP customizations but there is nothing you can do in php that can't be done in WP if you know what your doing.
  14. Variables are not interpolated within single quotes. Put your query within double quotes.
  15. Can we see your actual code and where you are calling this method? ps: Forming a construct by naming a method the same as the class has been deprecated since php 5.
  16. You will likely want to store the username within the $_SESSION array. function validate_user($un, $pwd) { $mysql = New Mysql(); $ensure_credentials = $mysql->verify_Username_and_Pass($un, ($pwd)); if ($ensure_credentials) { $_SESSION['status'] = 'authorized'; $_SESSION['username'] = $un; header("location: ../selfbuild/Controlpanel.php"); } return "Please enter a correct username and password"; } Then, on any page.... session_start(); if (isset($_SESSION['username'])) { echo "Hello {$_SESSION['username']}"; }
  17. I think the question is pretty clear considering session can be stored on either the file system or within a database. Where it gets unclear is I think the OP is relating the question to security in particular. If someone has broken into your server, I really don't think session data stored within a database is going to be any more secure than what is stored on the file system. Generally, you would use database session data storage only when you are looking for simple methods of tracking users around your site. eg; Who's currently logged in, what page are they on etc etc. For normal session usage, the file system is fine.
  18. And you are stuck where exactly?
  19. I'm sure there is a list on the Zend site. It's not something most sites generally advertise.
  20. Not in particularly, theres guys around here that are allot better practiced than I. Ignace would be one of them. I do use it though. I've written my own framework, and have worked with a few of the already existing ones. It is something that takes practice though, recognizing what design pattern will solve the problem at hand.
  21. Only if your pages are xhtml. Anyway, we need to see some code in order to understand what your actually talking about.
  22. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=311577.0
×
×
  • 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.