Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. If you couldn't get what are already existing, tested and working libraries working then you need to explain what you tried, what wasn't working and post some code so we can hopefully help you solve the issues. Throwing more code your way is NOT likely to help.
  2. Upgrade your browsers Flash player.
  3. That is a poor design decision. You should listen to TeNDoLLA's advice.
  4. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=338785.0
  5. Your form uses the method POST yet you are looking for data within the $_GET array.
  6. Unless live.co.uk is your domain you will always have trouble trying to send mail pretending to be from that domain. You should send your email from a valid email address on the same server that is actually sending the mail.
  7. Ajax is used to make behind the scenes requests back to the server from JavaScript. The server then generally responds by supplying the data you requested. Ive been using Mootols of latre so I'll show you an example using that: window.addEvent('domready', function() { $('initial-dropdown').addEvent('change', function(event) { var selection = event.target.get('value'); new Request.JSON({ url: 'dropdown.php', onSuccess: function (json) { for (result in json) { var option = new Element('option', { value: json[result].value, html: json[result].html }); option.inject($('secondary-dropdown')); } } }).post({'search': selection}); }); }); This makes a request to the php script dropdown.php when the initial-dropdown select changes sending it the selection within $_POST['selection']. The php script uses this data to execute a MySql query then returns the results as a json object (easily done using json_encode. This json object is then returned back to the JavaScript and turns up within the onSuccess function as data. From there, you simply loop through the results and add new <option> elements to the secondary-dropdown <select>. That is the basic concept (and untested Mootools code).
  8. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=338750.0
  9. Ajax is indeed a solution, I'm not sure what you mean by it being a second file though. Once the first selection has been selected you make an Ajax request back to the server sending it what was selected. The server should then respond with some json that contained the data required for the second selection. You may not need to use Ajax however if you already know what data your going to conditionally use to populate the second drop down with. Either way, your question has little to do with PHP.
  10. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=338743.0
  11. Where exactly are you stuck? Were not here to simply write code for people.
  12. Check the index exists first using isset.
  13. There's no need for a class here if that is all it does. Also, you should be overriding $_POST['password'] like that.
  14. These are likely just defaults. Zend (probably more than others) is completely configurable so you can put things wherever you like. There are basically two types of frameworks. One that favors configuration over convention, meaning you need to configure where everything goes, these usually provide fairly sane defaults as well though (Zend). The other, one that prefers convention over configuration, meaning you have to do things the way the framework wants and put things where it expects, these are usually configurable as well, though it might be a bit more work to get things going (Rails). So, with that in mind it all depends on how you work. What do I expect/want from a framework? A decent Routing mechanism, that is easy to configure/customize, sane defaults for parts of the application I don't want to have to worry about. Something that is fairly loosely coupled together so I can just use what I want, I don't really care for huge libraries of helpers but the ability to integrate other third party code should be pretty straight forward. Above all, clean tested code, good documentation and a decent community. Zend, Symfony & Rails have really been the only three I've spent much time with and in the end, I'm rolling my own. Zend is awesome but it's always taken me a long while to get things the way I wanted and even then on larger applications I've had allot of performance issues. I haven't used Symfony for anything bigger than a blog but it's nice (2 looks even better). Rails is something I would definitely like to spend more time with but I'm a PHP dev by trade and don't really have the time at the moment. Ruby does have an awesome community of quality devs though, so it is still a very tempting proposition.
  15. That is precisely why I pointed you to the manual page.
  16. array_walk returns a bool. It operates on your array by reference so you would only need.... array_walk($credits, 'trim_value'); not.... $credits=array_walk($credits, 'trim_value');
  17. Nope. If your not sure what it is you will need to reset it.
  18. Your using fred as your username to connect, try using root.
  19. The php.ini is well commented. See the error_reporting and display_errors directives.
  20. Static variables belong to the class not an object, if(logged_in(sessionsClass::$data['u_uid']))
  21. Zend offers more configuration over convention than many of the other frameworks so I'm not sure how you would find that limiting. If anything, you will likely find other frameworks more limiting in the way things are done.
  22. Sorry, but it's not related to php at all. Your not even having issues with a php file. I would check the permissions on the .htm file and make sure your server has permissions enough to read the file.
×
×
  • 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.