Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. trq

    iTunes

    There is no API as far as I am aware.
  2. trq

    php cli help

    You could split the input from STDIN by spaces and parse that as arguments.
  3. trq

    php cli help

    I would prompt the user for what function they want to use, then prompt them again for the arguments needed.
  4. Check that $_POST['TestGroup'] isset before using it.
  5. trq

    php cli help

    On what?
  6. trq

    iTunes

    Apple already actually provide something similar as part of iCloud.
  7. trq

    php cli help

    You can only use $argv to pass in initial arguments to the script. It's not much use if you don't know what function there going to be calling. Also, the shebang needs to be on the first line not within the <?php code block.
  8. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349090.0
  9. trq

    php cli help

    #!/usr/bin/php -q <?php $isAuthenticated = false; $realUserId = "aaa"; $realPassword = "pass"; while( $isAuthenticated!=true ) { echo "Please login to begin: \n"; echo "Enter username: \n"; $userName = fread(STDIN,10); echo "Enter password: \n"; $password = fread(STDIN,10); //now check to make sure is registerd user //$userId = $u->userLogin($userName, $password); if($userName != $realUserId && $password != $realPassword) echo "Invalid username or password. Please try again.\n"; else { echo " You are logged in! You can begin.\n"; $isAuthenticated = true; } } ?>
  10. Remove the echo that produces <br>
  11. This topic is going nowhere fast. If you are not prepared to listen to the replies provided don't bother asking questions. If you have read the replies but don't understand how they are useful re read them and ask a specific question about what you don't understand. If your just going to keep repeating your own failed solutions, stop wasting our time.
  12. You can do it with a single query using a JOIN.
  13. Also, assuming your php code is already running within a page, you don't need the doctype, <html> or <body> tags. The page your already on should already have these.
  14. This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=349030.0
  15. An IN statement check to see if the field contains any of those numbers. As for your second circumstance, you shouldn't be storing multiple values in a single field in the first place.
  16. Where exactly are you stuck?
  17. The process is no different, just put each line of markup on a new line in a txt file. Either that or add the markup to your content using php.
  18. HTML isn't a programming language and as such cannot read files.
  19. This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=349008.0
  20. PHP alone doesn't have any concept of "plugins".
  21. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=348956.0
  22. The reason it was a double negative of sorts is because you have a ! in front of preg_match, meaning if not. You also had a ^ in your expression which in the location you had it means if not. Besides this though, I don't see the point in validating a username in this situation. You should be validating the data on the way into the database. If you do that, you don't need to validate it again when looking it up.
  23. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=348953.0
  24. Did you actually read my reply? Why are you still trying to duplicate your data?
×
×
  • 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.