Jump to content

Nordskjold

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Nordskjold's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you all, made it all work, didn't realize so much error caring was needed, and Dorky thank you for the strtolower, it worked ^^
  2. Thank you PFMaBiSmAd, for your input, but unfortunately the only output i get when trying is: POST:Array ( [upload] => Upload ) FILES:Array ( [file1] => Array ( [name] => DSC00127.JPG [type] => [tmp_name] => [error] => 1 => 0 ) ) Can't really figure out what i'd do with that.. Still can't upload .JPG i can upload an image as long as the ending is .jpg lowercase.
  3. I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what causes it to crash but been testing it for some time and it's my retrictions that won't allow it in. Also I'm experiencing that it sometimes deny to upload pictures if the height or width of that image is above 2000. Here's the code: if(($_FILES[$Ufile]["type"] == "image/jpeg" || $_FILES[$Ufile]["type"] == "image/jpg" || $_FILES[$Ufile]["type"] == "image/pjpeg") && ($_FILES[$Ufile]["size"] < 2000000)) Thanks in front^^
  4. Hey, I have for some time been working on a php gallery, and now i need to scan a dir and write all the jpg's from the dir to a .gz file.. The problem is that I've only succeeded writing strings.. $gz = gzopen('test.gz', 'w9'); $dir = opendir("test"); while (($file = readdir($dir)) != false) { if ($file == "." || $file == ".."); else { gzputs ($gz, $file); } } closedir($dir); gzclose($gz); In advanced, thank you
  5. Hey, I have for some time been working on a php gallery, and now i need to scan a dir and write all the jpg's from the dir to a .gz file.. The problem is that I've only succeeded writing strings.. $gz = gzopen('test.gz', 'w9'); $dir = opendir("test"); while (($file = readdir($dir)) != false) { if ($file == "." || $file == ".."); else { gzputs ($gz, $file); } } closedir($dir); gzclose($gz); In advanced, thank you
  6. Hi everybody, I'm atm testing my login php script but the weird about it is that when i tell it to get all users in the DB and put them in an array, it only takes and logs in the first in line (in the DB) the rest of the users in the DB kinda don't exist :s Have a look: <?php session_start(); $sess = FALSE; if (isset($_SESSION['bruger']) && isset($_SESSION['password'])) { $sess = TRUE; } if ($sess == FALSE) { $output = ' <form action="" id="login_form" name="login_form" method="post"> <table> <tr> <td width="145px"></td> <td><a name="registrering">Log ind </a></td> <td><input type="text" id="login_brugernavn" name="login_brugernavn" tabindex="1" /></td> <td><input type="password" id="login_password" name="login_password" tabindex="2" /></td> </tr> <tr> <td></td> <td><a name="registrering" href="../registrering/index.php" class="linkz">Registrer</a></td> <td></td> <td align="right"><input type="submit" id="submit" name="submit" value="Login" tabindex="3" /></td> </tr> </table> </form>'; require("connect_my_db.php"); $resultat = mysql_query("SELECT * FROM brugere"); if (isset($_POST['submit'])) { if (!$_POST['login_brugernavn'] || !$_POST['login_password']) { echo "<span class='fejl_message'>*Du mangler at udfylde nogle felter*</span>"; } while ($bruger = mysql_fetch_assoc($resultat)) { if (($bruger['Brugernavn'] <> $_POST['login_brugernavn']) || ($bruger['Kodeord'] <> $_POST['login_password'])) { echo "<span class='fejl_message'>*Brugeren eksistere ikke*</span>"; break; } else if (($bruger['Brugernavn'] == $_POST['login_brugernavn']) && ($bruger['Kodeord'] == $_POST['login_password'])) { if (($bruger['Value'] == 3)) { echo "<span class='fejl_message'>*Din bruger er blevet bannet i 2 uger*</span>"; break; } else if (($bruger['Value'] == 0)) { echo "<span class='fejl_message'>*Du er blevet slettet*</span>"; break; } else { $_SESSION['bruger'] = $bruger['Brugernavn']; $_SESSION['password'] = $bruger['Kodeord']; header('Location: ../'); } } } } } if ($sess == TRUE) { $output = '<form action="" id="logout_form" name="logout_form" method="post"> <div style="float:right; padding:15px 35px 0px 0px;"><input type="submit" id="logout" name="logout" value="Logout" /></div> </form>'; if (isset($_POST['logout'])) { session_destroy(); header('Location: ../'); } } ?> I really need help on this one, been driving me mad for days now..
×
×
  • 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.