chigley
Members-
Posts
957 -
Joined
-
Last visited
Never
Everything posted by chigley
-
<?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
-
[SOLVED] Passing Variable Thourgh Header Redirect
chigley replied to phpretard's topic in PHP Coding Help
<?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 -
http://www.phpfreaks.com/forums/index.php?action=pm;sa=send;u=50039
-
Should work and, yes, I'll need the info.
-
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
-
[SOLVED] Mysql Query Running but not working!?!?
chigley replied to ManicMax's topic in PHP Coding Help
Just below the bottom post, and a bit to the left is a "Topic Solved" button -
[SOLVED] Mysql Query Running but not working!?!?
chigley replied to ManicMax's topic in PHP Coding Help
UPDATE calendar SET am700='1', am730='1' WHERE date='14/04/08' -
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?
-
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.
-
If you're in PHP 5, you can use file_put_contents(). If not, fopen() and fwrite() will do the job.
-
[SOLVED] Mysql Query Running but not working!?!?
chigley replied to ManicMax's topic in PHP Coding Help
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 -
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.
-
cURL and/or file_get_contents() depending on whether the form uses POST or GET.
-
[SOLVED] Mysql Query Running but not working!?!?
chigley replied to ManicMax's topic in PHP Coding Help
What field type is date? -
What's the formula for the calculation? And where are the statistics stored?
-
<?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
-
Paste the full code you're now using?
-
You'll have to explain a bit better - I don't really understand you!
-
echo $row[times][0]; ^ Try that? Or post your array structure if that doesn't work.
-
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
-
You don't need to put anything in the quotes. Just stick it at the top of your current index.php
-
In your HTML form, instead of name="$sig" use name="sig"
-
<?php // index.php if(trim($_SERVER["QUERY_STRING"]) == "") { include("/path/to/file.php"); } // rest of code ?> Tried that?
-
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.
-
Get rid of the $ before it.