Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. The errors are pretty self explanitory surely. They state exactly what is wrong.
  2. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=322578.0
  3. The logic you have described has nothing to do with whether or not its done inside a class or not, besides, this really is a bad example of how classes work. Generally, a class wouldn't automtically execute its functionality when instantiated.
  4. HTML is not able to do anything with such data, its not a programming language.
  5. Why do you want to do this? You don't just transform procedural to OOP without any benifit. What is your expected benifit here?
  6. Firstly, your logic itself doesn't really make sense. It says, (calling OldName()) if the username provided is the same as the current name, call a function that displays 'this is a brand new name' Can you see any sense it that logic?
  7. You need to turn error reporting on and make sure display_errors is also on. Your missing a brace on this line.... while($subrow = mysql_fetch_assoc($subcats){ You should also look into mysql JOINS (there is a tutorial on this site), your code is very un-efficient.
  8. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=322571.0
  9. Firstly, there is this sticky thread: http://www.phpfreaks.com/forums/miscellaneous/which-php-editor-do-you-think-is-the-best-(v2) . We really don't need another. Secondly, netbeans does have syntax highlighting and has no issue saving files wherever you like.
  10. The www-data user cannot login and therefor does not get a home directory. Why would they need one?
  11. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=322457.0
  12. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=322255.0
  13. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=322256.0
  14. Indeed it is. But you don't have that code anywhere. Is the function in the same file is you call to mail() ? Globals are bad, and calling a function is not the same as defining it. The top piece of code in your post defines the function. quicknote() calls it (which you need to put where I did in my reply..
  15. $messages.="Quick Quote Request: " . quickquote() . "<br>"; I should add that you never actually called your function in your previous code, also, variables defined and used within functions do not exist outside of that function.
  16. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=322237.0
  17. You don't learn parts of a programming language before you use it.
  18. Where exactly are you stuck? Posting the problematic code would help.
  19. Because 'action =' is outside of php tags. It is html which is output.
  20. Use a service like http://dyndns.org to get a hostname.
  21. Sounds like you might not have permission to execute the init script. Try using sudo /etc/init.d/httpd restart
  22. I can tell just by the name 'controller' that it is not at all related to and therefore should not extend the database class. The database class might be a dependency, but that's it. Even then, any database interactions should likely be moved into models (but I won't go into that). You controller simply requires the Database class. This should be passed into your __construct() method.
  23. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=322225.0
  24. trq

    subdomain

    Not particularly easy. http://www.tomhoppe.com/index.php/2008/03/cross-sub-domain-javascript-ajax-iframe-etc/
  25. You cannot implement a class, only an interface, so that solves that. I assume when you say obstantiate, you mean instantiate? You can setup a __construct in a child class that calls the parent _-construct() before doing its own work. class Foo extends Bar { public function __construct() { parent::__construct(); // do own setup } } On a side note. be careful extending a database classes. does the child really extend the database or just depend on it? There is a difference.
×
×
  • 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.