Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Please, learn how to ask a question.
  2. Make sure you have error reporting set to E_ALL and display errors on. <?php error_reporting(E_ALL) ; ini_set('display_errors', '1'); ?>
  3. Are you sure /kunden/usr/local/bin/php is where php is installed? Seems an odd location. Also, remember that cron doesn't have much of an environment so you need to be careful to use full paths to files when your including them. We might need to see the code within your actual script.
  4. The ex. file needs a php file extension to be parsed as php.
  5. There is a sticky thread covering this subject within the appropriate board. Miscellaneous.
  6. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=307486.0
  7. Read the 'How To' link in my signature and try again.
  8. Having that catch-all at the top of your program is always going to be problematic because as you have discovered, one of either $_GET, $_POST, $_REQUEST or $_COKKIES indexes contains an array not a string. Also, who's to say $_POST data is always going to the database? My advice, drop it, validate and clean your data as required.
  9. Why don't we start with you telling us the problem?
  10. You don't retrieve the posted data from $_POST.
  11. I'm not sure there is a way of doing this cleanly. I wouldn't be using the magic __set or __get methods if possible.
  12. The first link provided is your best bet. It is the documentation for the Youtube API. If you can't understand it, well, that's another issue. I suggest instead of looking for a quick fix you actually read through the documentation.
  13. so you mean this is wrong even if it works well on my part? I added this on the above script: $lang= curPageURL(); $query = parse_url($lang, PHP_URL_QUERY ); if ($query=="lang=zh-hans") Your going about it the long way. Whats wrong with.... if ($_GET['lang'] == 'zh-hans') { // do whatever. } Of course, you should also check lang is set first.... if (isset($_GET['lang'] && $_GET['lang'] == 'zh-hans') { // do whatever. } This is why I asked what exactly you where planning on doing with the data in my first reply. There really is no need to parse the url yourself.
  14. The most common usage of the query string part of a url is to retrieve the part you want from within the $_GET array. Parsing the string yourself is almost always un-required. I'm quite sure your going about this the wrong way.
  15. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=307333.0
  16. Post your exact code. It looks like (I should have noticed this within your first post) $username & $hostname are literally being passed to mysql_connect.
  17. A bit nit picky but, it's actually how properties and methods are accessed from an object. If you want to access properties/methods of a class (they would need to be defined as static), you would use the :: operator.
  18. You might want to post the relevant code pertaining to the error.
  19. You need to make sure your user has permissions to connect from the remote host. its all covered in the manual. http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
  20. Because the syntax is LIMIT 1, no equals sign.
  21. This board is for help with coding problems.
  22. Instead of me explaining everything, I'll just point you to the manual from here. http://jqueryui.com/demos/slider/ The bottom of that page lists all the options, events and methods available. for the slider.
  23. if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { // use data } else { // no data found. } } else { // query failed } ?>
  24. Instead of using the wildcard * (which is never a good idea), specify the fields you want and use the DATE_FORMAT() function around your Date field.
  25. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=307287.0
×
×
  • 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.