Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. You are of course including the jQuery framework somewhere?
  2. $match = preg_match("/[A-Z]/", $_GET['letter']);
  3. You can also use return from within an included file.
  4. How about you describe what your actually want to do, and not what you think is the solution. You can then get opinions from people who actually no what they are doing as to how your problem might be resolved.
  5. I would agree with Jessica in this instance, but I would also like to point out a "proper way" for doing similar things. You need what is called a "factory". This factory would be responsible for creating different kinds of "User" objects dependant on a certain criteria. Without going into to much detail, the end call might look something like: $user = UserFactory::get(100); Where 100 is the user id as stored in the database. The user factory is then responsible for creating whatever "User" type needs to be created and returning it.
  6. You forgot to ask a question.
  7. trq

    Gwallet

    Very straight forward. <?php // process data then if ($success) { echo '1'; } else { echo '0'; } The hard part is going to be doing whatever you need to do with the data. What exactly are you expecting to do with the data?
  8. It has nothing to do with loops. This can be achieved in a single query. SELECT a.something, b.somethingelse FROM table_a a LEFT JOIN table_b b USING(table_a_id) If you need more help take a look at some tutorials on using a "MySql JOIN" or post your table structure so we can give you a more concrete example.
  9. But the site does have the problem. It doesn't work without JavaScript. Like any good site, Google handles JavaScript being disabled just fine.
  10. trq

    Using PDO

    That is a terrible coding practice I'm sorry, and is something I would definitely try not to replicate again ever. What if mysql_query fails? Using your method you have absolutely no way of handling it at all properly.
  11. It's pretty unclear as to what the problem is but me guess is that your not understanding variable scope. Variables declared outside of a function are not available inside of a function and vs versa.
  12. You need to try and put your sentences together so that they can be comprehended properly by those reading them.
  13. Just echo $passReg if you really want to see it.
  14. Most JavaScript frameworks have this (or similar) functionality built in. For instance, jQuery triggers an event when the DOM is ready. http://api.jquery.com/ready.
  15. That would completely depend upon how your application is written. When we write apps, we make sure to configure a base path config options that can be changed in a single place and yet used in many.
  16. No, and I have no idea where you would here such a comment. Are there any particular parts that another framework does so much better? Symfony2 isn't perfect, sure, but it does most things very well. I'm aware it's considered difficult to learn, but I'm sure I can get past that with hard work. It definately isn't the easiest framework to lear, but if you have a good grasp of OOP & design patterns you should feel at home pretty quickly. Any other advice regarding starting out with Symfony2 would be appreciated. Learn OOP and at least the most common design patterns first.
  17. is there a reason your not installing from pre compiled packages?
  18. Your doing it wrong then. How are you escaping your data before using it within your queries? Post some code.
  19. Curly braces make no difference. Variables are not interpolated within single quotes . Full stop.
×
×
  • 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.