Jump to content

Carterhost

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Carterhost's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just an FYI - The site looks clearer and cleaner (even without the CSS3 stuff) in IE6 than it does in chrome.
  2. Try using Quotes? $timedate[0] = "00,00,00,05,20,2003"; $timedate[20] = "00,00,00,11,03,2004";
  3. I would probably use FTP_BINARY as the mode, unless the only thing you're uploading is Text files. Text files can be uploaded in binary mode no problem. Binary files (including JPGs) will not transfer correctly in FTP-ASCII Mode.
  4. Create a new file: phpinfo.php Put this inside it: <?php echo phpinfo(); ?> View that in a browser, then look through that for these: upload_max_filesize post_max_size max_input_time max_execution_time memory_limit
  5. You still haven't asked a question really, though?
  6. In answer to the second question: yes. $Result= mysql_query("SELECT * FROM $Table WHERE Username='$_POST['Username']' AND Gender='$_POST['Gender']'") Or: $Result= mysql_query("SELECT * FROM $Table WHERE Username='$_POST['Username']' OR Gender='$_POST['Gender']'")
  7. Yeah, Couldn't even find matching commands in the php manual. ???? what the commands is inside the class Eek, My Bad. Edit... it's too late for me. Roll on 1am when I can finish work!
  8. Yeah, Couldn't even find matching commands in the php manual.
  9. use this instead: $sql = "SELECT * FROM ipsr_garage WHERE userid = $userid"; $result = $db->sql_query($sql); $num_rows = mysql_num_rows($result); if ($numrows == 0) { echo "You currently have no cars in your garage."; }else { while ($row = $db->sql_fetchrow($result)) { $year = $row['year']; $make = $row['make']; $model = $row['model']; echo "$year $make $model"; } } It counts the number of results, instead of pulling the first result for the test.
  10. Example from php.net which could be useful: <?php $lastthurs=strtotime("last Thursday",mktime(0,0,0,date("n")+1,1)); ?> Returns the last thursday of this month. <?php $firstthurs=strtotime("next Thursday",mktime(0,0,0,date("n"),1)); ?> Returns the first thursday of this month. So if I didn't need more coffee to stay awake, I'd work out the code for you. 1. Test whether you're past the first thursday of the month 2. If yes, get the date of the last thursday. If no, get the date of the first. 3. Convert it to a nice format 4. Echo it
  11. Quick and Dirrty: redirect.php: <?php $year = $_GET['year']; $month = $_GET['month']; $url = "http://invincible.comics-database.com/database/comicsByReleaseDate/".$month."-".$year; header('Location:'.$url); ?> Use this as the whole page. You should expand on it to do some input checking on your $_GET variables, but this should basically be it. Remember, no spaces or HTML before this code or you'll get the dreaded "Headers already sent" Error.
  12. It's not foolproof, but if you just specify the height in the image tag (i.e. no width) then the aspect ratio is usually kept...
  13. Thanks, I'll try that. It seems that this only occurs when it's edited on a mac. PC's are fine (Vista, XP and Kubuntu all tested okay) Anyone know why??
  14. Hi. I want to be able to store HTML input from a text field, and I wanted to encode it when it went in, so that it didn't break the PHP as it was assigning it to the variable. so I used URLEncode and URLdecode, but thenin text, "you'll" ends up as "you�ll", which is not what I want. Is there something else I could use? I've looked at a few functions in the man pages, but I don't think they're what I need. Cheers muchly.
  15. while($res = mysql_fetch_array($result)) { if($res['rank'] != "Guest" || $res['rank'] != "Administrator") echo "<option value='"$res['rank']"'.>".$res['rank']."</option>"; } That will populate your $_POST['rank'] with the rank, as long as it's not Guest or Administrator.
×
×
  • 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.