Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Not exactly. That will just override what you have in $_SESSION['product_id'] and $_SESSION['quantity'].
  2. The $_SESSION array is no different to any other array except it's more persistent.
  3. You cannot make a variable global across different scripts. You will need to include the script that defines $page anywhere you need it.
  4. Where is $pass defined? You really don't need so much code to do this either. $user = mysql_real_escape_string($_POST['user']); $pass = base64_encode($_POST['password']); $query = "SELECT id FROM users WHERE user_name = '$user' AND user_password = '$pass'"; if ($result = mysql_query($query)) { if (mysql_num_rows($query)) { // match found } else { // no match found }
  5. Globals are inherently bad and should be avoided wherever possible. They completely break the encapsulation provided by functions and classes.
  6. There are no buttons in your code, making your post quite difficult to understand.
  7. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=345265.0
  8. Sorry, but that statement doesn't make a great deal of sense. What exactly is the issue?
  9. Street talk? That will be useless. So, you know enough about mysql to rewrite the manual better then the developers who created it, work with it, and use it every day? You have got to be joking. Sure, you could write a few tutorials on some simple select statement or whatever, but do you really think you know better than the people who currently write the manuals. Technical documentation is just that, it's not meant to be dumbed down because the technical details are often needed to understand the product. If you want to be a developer, you need to learn to enjoy reading technical reading material. If you don't enjoy doing so, you'll just plateaux out.
  10. I'm not sure, you still haven't told us what is happening.
  11. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=345250.0
  12. The above will work fine as long as js.js is in the same directory as the page being viewed. What exactly is the issue?
  13. I think the array your thinking of is $_FILES and it has nothing to do with retrieving files. Ig you already have the file uploaded, you simply need to use a html anchor tag to link to the file. Nothing at all to do with php.
  14. That statement makes no sense. What does an anchor tag have to do with Javascript?
  15. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=345199.0
  16. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=345200.0
  17. Web server run as a particular user on the system. This in turn effects what permissions the server has.
  18. Your question has nothing to do with php and is more a Linux question. 755 means that only the owner of the directory can write to it. 777 means anyone can write to it.
  19. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=345189.0
  20. There is nothing special about it. Any method that wouldn't normally return a value (setters for example) should simply return $this.
  21. Why not do a search for it? It's likely not to be in a single piece like that though.
×
×
  • 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.