Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Classes are generally designed to store data and functions that relate to processing that data. You use the __construct to instantiate an object (setup it's internal data) then generally call one methods to more to work with that data. If you using classes to simply group functions together (you shouldn't be using them), then you can make your methods static. class Foo { public static function Bar() { echo "This is Foo::Bar"; } } Foo::Bar(); Also, in PHP5.4 you can now call a method without needing to store an object in a variable. (new SomeClass)->someMethod(); Then just use a function.
  2. You could write a handler within a custom 404 handler but it gets pretty messy. Why exactly are you avoiding mod_rewrite?
  3. Apache or Nginx. http://httpd.apache.org/ http://nginx.org/ though I would recommend Apache for now as it is still the most common server in use with PHP. Eventually you'll need MySql as well. Oh, and PHP http://php.net
  4. You need a http server installed and configured to execute php.
  5. Then how do you explain the fact that it is missing from your data in the database? (hint, your using strip_tags on the data) As for this: $box = str_replace("</ br>", ".", $box ); // this is where I am trying to replace the <br> with a full stop That tries to replace </ br> with . there is no </ br> in your data.
  6. Just comment out wherever your executing your query and echo it instead.
  7. No where in your code have you tried either of those two things. You still haven't explained where (or why) you strip the <br> tags before inserting this data into your database.
  8. echo $sql so we can see the query.
  9. When I import this to the database it becomes And what exactly are you doing to make that happen?
  10. It needs to be concatenated together with & A cleaner method is to use an object. data: { email: $('#email').val(), fname: $('#fname').val(), sname: $('#sname').val() }
  11. You might want to be more specific. Adding a link is as simple as adding the html to your view.
  12. More band aids. It is logically incorrect to try and output something before sending headers. The code should actually be fixed.
  13. Just check if the user is logged in and if not display your message.
  14. You must have missed this: http://www.phpfreaks.com/forums/index.php?topic=37442.0
  15. trq

    Popunder

    Most pop-ups are blocked by pop-up blockers or people have them set to open in new tabs instead. There is no way of doing this reliably.
  16. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=355753.0
  17. Congrats man, welcome aboard.
  18. You have to understand the difference between server side and client side. Browsers run on the client side and can only access as far up your filesystem tree as the servers root. PHP on the other hand runs server side and can (generally) access any file on the computer the server is running on.
  19. If your planning on using that code on the web it won't work because C: is not accesible. You need to start from the root of your server, not your OS. Probably: /system_lords/images/26hicon.gif
  20. Have you looked at the examples on the man page? mail.
  21. My advice is to open an account on http://github.com and start coding. Without code your project is dead.
  22. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=355719.0
  23. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=355702.0
  24. How about next time you have a look around for an appropriate board yourself? Your questions has nothing at all to do with php.
×
×
  • 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.