Jump to content

chigley

Members
  • Posts

    957
  • Joined

  • Last visited

    Never

Everything posted by chigley

  1. <?php $lines = file("akc.txt"); foreach($lines as $line) { $line = trim($line); if(substr($line, 0, 1) == "!") { $breed = substr($line, 1, (strlen($line) - 2)); $query = mysql_query("UPDATE table SET AKC = 'YES' WHERE breed = '{$breed}'") or die(mysql_error()); } } ?> ^ Try that
  2. <?php $event = $_GET['event']; header("Location: http://www.website.com/index.php?page=checkout&event={$event}"); ?> Use double quotes when using variables inside them. I also added {} to make doubly sure
  3. http://www.phpfreaks.com/forums/index.php?action=pm;sa=send;u=50039
  4. Should work and, yes, I'll need the info.
  5. You won't be able to use their current login data with the script, which would mean the PHP will require a username/password to use to login. I'm a bit bored, so I'm happy to help with this, but I'll need some account credentials
  6. Just below the bottom post, and a bit to the left is a "Topic Solved" button
  7. UPDATE calendar SET am700='1', am730='1' WHERE date='14/04/08'
  8. That link requires a login so isn't much help. Is there no way you could have all the item stats in a database somewhere? Or shown on a page that doesn't require a login?
  9. So... Attack: 10 HP: 10 Max rage: 10 Experience per turn: 10 Rage per turn: 10 Rampage: 10 Would become: 11.5 for each (after 1 enchant) 12.5 for each (after 2 enchants) 13.5 for each (after 3 enchants) 14.5 for each (after 4 enchants) Is that right? If yes, that's easy, now all we need to do is understand the input.
  10. If you're in PHP 5, you can use file_put_contents(). If not, fopen() and fwrite() will do the job.
  11. If the question was for me: Mysql Data Types, like "date" or "time"!!! See the manual If not sorry. Nah it was aimed at the OP
  12. You'll have to explain it better than that. We need to know: - What the input will be - How to process the input - What the output will be - Exactly where the statistics are stored Plus, members of this forum tend to fix existing code rather than do your code from scratch.
  13. cURL and/or file_get_contents() depending on whether the form uses POST or GET.
  14. What's the formula for the calculation? And where are the statistics stored?
  15. <?php $times = array('am700', 'am730', 'am800', 'am830', 'am900', 'am930'); include("db.php"); $query = mysql_query("SELECT * FROM table_name") or die(mysql_error()); $row = mysql_fetch_assoc($query) or die(mysql_error()); echo $row[$times[0]]; ?> ^ Try that
  16. You'll have to explain a bit better - I don't really understand you!
  17. echo $row[times][0]; ^ Try that? Or post your array structure if that doesn't work.
  18. Hey guys, Just wanting to evaluate people's ideas on whether or not a database-based session would be better than PHP's session functions. What're your opinions? All database? All PHP sessions? A compromise? Charlie
  19. You don't need to put anything in the quotes. Just stick it at the top of your current index.php
  20. In your HTML form, instead of name="$sig" use name="sig"
  21. <?php // index.php if(trim($_SERVER["QUERY_STRING"]) == "") { include("/path/to/file.php"); } // rest of code ?> Tried that?
  22. What ever happened to "if it ain't broke, don't fix it"? If it works, I don't see why you should bother changing it.
×
×
  • 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.