Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Post some relevant code.
  2. id attributes must begin with a letter, not a number.
  3. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=360077.0
  4. See if you can use it?
  5. Very limited information and posted in the wrong board. Does the captcha code generate the images using GD? Do you have the GD extension installed for PHP?
  6. Firstly, $data will never equal 1. It will be a result resource if your query succeeds, or the bool false if it fails. Secondly, no where in your code do you attempt to use the resultant data from your query.
  7. You are over writing the $return_string variable on each iteration. Declare it before your loop starts and then append to it on each iteration.
  8. Because, as I said, you need to send it as a html email. It's all covered in the link I provided.
  9. Turn error reporting on when your developing. That piece of code will produce an error. It should be... $ref = "http:www/sitename/propiedad_detalle.php?id_propiedad=$idPropiedad"; And if you want it to be a link, you will need to wrap it in the html it needs to be a link. $ref = "<a href='http:www/sitename/propiedad_detalle.php?id_propiedad=$idPropiedad'>link</a>"; You will also however, need to send the email as html. This is covered in the mail page of the manual.
  10. Um not sure if this is your issue or not, but the problem with cookies is this: If you call setcookie() and then (on the same page) try and look at that cookie using the $_COOKIES array it wont yet be set. The reason for this is that cookies aren't actually set when setcookie() is called, but when the script has finished execution and all the headers are sent (setting a cookie just sends a specific header). It's pretty hard to tell from your description if this issue describes your problem or not. You might need to post some relevant code.
  11. You need to redirect after setting a cookie in order for it to take effect.
  12. This topic has been moved to PHP Coding Help. http://www.phpfreaks.com/forums/index.php?topic=360040.0
  13. Yes you can dynamically add elements to a form via Ajax. Have you tried it?
  14. You never save the value returned by implode to a variable.
  15. Oh, and ps: The autoloader in my framework (Proem) is PSR-0 compliant. If you want a simple solution download my framework (link in my signature), include the autoloader into your code, then register the OAuth2 namespace with the autoloader by telling it the root of the namespace and the directory it can find it. eg; <?php require_once "/path/to/Proem/lib/Autoloader.php"; $loader = new \Proem\Autolader; $loader->registerNamespace('OAuth2', 'path/to/OAuth2/library')->register(); // You should now be able to use the OAuth2 library here. Proem does require PHP5.4 however. Many other frameworks have PSR-0 compliant autoloaders including Symfony2 and Zend2. Even the link to the PSR-0 page I provided has a very simple implementation.
  16. Composer is used to package dependencies for an application or library. eg; You want to use library Foo, library Foo depends upon LibA and LibB. You download Foo and install it's dependencies using composer. The issue you are having seems unrelated. You are trying to use a library without including all the files that that library (and your code) needs. On top of that, Iv'e just had a look at the library your using and it's composer file does not actually require any outside dependencies, so there is no need to run composer on it at all. The composer.json file is only there (in this case) so that this library can be easily included into other libraries. If your not willing to use an autoloader (any PSR-0 compliant one will work) then you are going to need to require any files you need to use manually. I'm really not sure what the issue is.
  17. If you expect us to be able to help you we are going to need more details than that simple comment. What exactly is the issue?
  18. Agreed. I think your a bit out of your depth here. Sure, when some of the concepts of OOP finally click with you it's easy to think it is the be all and end all. The truth be known however, it's not. Don't get too enthusiastic.
  19. Have you looked at the documentation for composer? It is simple to use.
  20. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=359959.0
  21. Just install Nginx then. I'm not much of a fan of these prepackaged things.
  22. 5.4 is at 5.4.3 now. Stable. PDO does not belong in your controllers. You should only be accessing the database via Models.
  23. I'm not sure any of these questions can be answered in a simple forum post. There are much more robust ways of loading controllers. And any dependencies they need should be loaded in via the __construct. As for loading PDO. That is a prime candidate for dependency injection. Google it. There is a link to my framework in my signature, it's still in a pre-alpha stage, but it's well worth a look at.
  24. Are you saying it isn't being autoloaded then?
  25. Have you actually included the Controller class somehow?
×
×
  • 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.