trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
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.
-
Upgrade your browsers Flash player.
-
That is a poor design decision. You should listen to TeNDoLLA's advice.
-
Selection of one drop menu populates second drop down menu
trq replied to HDFilmMaker2112's topic in Javascript Help
Does my example not look a whole lot simpler? -
Your form uses the method POST yet you are looking for data within the $_GET array.
-
Mail error: SMTP server response: 550 The address is not valid.
trq replied to Andy11548's topic in PHP Coding Help
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. -
Selection of one drop menu populates second drop down menu
trq replied to HDFilmMaker2112's topic in Javascript Help
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). -
Selection of one drop menu populates second drop down menu
trq replied to HDFilmMaker2112's topic in Javascript Help
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. -
This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=338743.0
-
Where exactly are you stuck? Were not here to simply write code for people.
-
Check the index exists first using isset.
-
There's no need for a class here if that is all it does. Also, you should be overriding $_POST['password'] like that.
-
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.
-
Need help: How to create SQL Insert value fields in loop?
trq replied to dlabacs's topic in PHP Coding Help
That is precisely why I pointed you to the manual page. -
move file from /root to /root/public_html directory
trq replied to mariam's topic in Third Party Scripts
rename. -
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');
-
Nope. If your not sure what it is you will need to reset it.
-
Your using fred as your username to connect, try using root.
-
Need help: How to create SQL Insert value fields in loop?
trq replied to dlabacs's topic in PHP Coding Help
implode. -
The php.ini is well commented. See the error_reporting and display_errors directives.
-
Static variables belong to the class not an object, if(logged_in(sessionsClass::$data['u_uid']))
-
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.