hmm. @Fils, Dat heef took niet geholpen.
Posts by gamesongz
-
-
Danku voor je snelle reactie.
Ik heb inderdaad gedaan wat je zei.
Maar nog steeds dezelfde error.Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/u601239250/public_html/index.php on line 121
-
Zorg eerst eens dat het fatsoenlijk staat want hier kan niemand wat mee...
Done.
-
Hallo, wanneer ik wil inloggen/Registreren komt er een error.
Dit was voordat ik verhuisde van host, er helemaal niet.
dus, ik vind het maar een beetje raar.Error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in/home/u601239250/public_html/index.php on line 120
Code: (een klein deel)
[PHP]if($dead = "false"){
include('connect.php');
$pass1 = md5($pass1);
$query = mysql_query("SELECT status FROM members WHERE username = '$username' and password = '$pass1'");
$rows = mysql_num_rows($query);
if($rows > 0){
$row = mysql_fetch_assoc($query);
$username = mysql_real_escape_string($username);
$_SESSION['login']=true;
$_SESSION["username"]=$username;
$_SESSION['rank'] = $row['status'];
print "<font size=1 face=verdana><br />Succesfull logged in!";
}
else{
[/PHP] -
Hallo,
Wanneer Iemand, of ik, naar mijn website wil gaan.
Krijgt hij deze error:
Fout 310 (net::ERR_TOO_MANY_REDIRECTS): Er zijn te veel omleidingen.Wat kan ik aan mijn script veranderen, om deze te laten werken?
EDIT: #Slotje.
Problem Solved -
Thanks.
Slotje -
PHP
Toon Meer<?php// Simple PHP Upload Script: http://coursesweb.net/php-mysql/ $uploadpath = ''; // directory to store the uploaded files$max_size = 200000000; // maximum file size, in KiloBytes$alwidth = 90000; // maximum allowed width, in pixels$alheight = 80000; // maximum allowed height, in pixels$allowtype = array('mp3'); // allowed extensions$fileCount = (int) count(glob($uploadpath . "*.mp3")); $newfilename = 'song' . ($fileCount + 1) . '.mp3'; //New File Name if(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) { $uploadpath = $uploadpath . basename( $_FILES['fileup']['name']); // gets the file name $sepext = explode('.', strtolower($_FILES['fileup']['name'])); $type = end($sepext); // gets extension list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']); // gets image width and height $err = ''; // to store the errors // Checks if the file has allowed type, size, width and height (for images) if(!in_array($type, $allowtype)) $err .= 'Upload Failed, Invalid Extension'; if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.'; if(isset($width) && isset($height) && ($width >= $alwidth || $height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x '. $alheight; // If no errors, upload the image, else, output the errors if($err == '') { if(move_uploaded_file($_FILES["fileup"]["tmp_name"], "" . $newfilename)) { echo 'Song successfully uploaded'; echo '<br />Link To Song <input type="text" class="optionstxt" readonly style="width:300px;" value="http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$newfilename.'">'; } else echo '<b>Unable to upload the file.</b>'; } else echo $err;}?>
Wat moet ik hier precies aan veranderen?
Om meerdere files te kunen uploaden? -
Helaas, Hij geeft nog steeds een error weer.
-
-
Hallo, ik wou een tabelletje invoeren, daarstraks werkte hij nog op mijn andere pc.
Nu in een keer niet meer.
Hier een pic.
-
Na het lezen van deze tut: http://www.phphulp.nl/php/scri…ogin-en-registratie/1873/
heb ik een andere registratie system.
Probleem, er staan nergens te invoer tabellen voor de mysql database......
Iemand die mij zou kunnen helpen hiermee?
-
Wel, Verder in de index.php pagina, heb ik deze ook nog staan.
[PHP]<?php
// Simple PHP Upload Script: http://coursesweb.net/php-mysql/$uploadpath = ''; // directory to store the uploaded files
$max_size = 200000000; // maximum file size, in KiloBytes
$alwidth = 90000; // maximum allowed width, in pixels
$alheight = 80000; // maximum allowed height, in pixels
$allowtype = array('mp3'); // allowed extensions
$fileCount = (int) count(glob($uploadpath . "*.mp3"));
$newfilename = 'song' . ($fileCount + 1) . '.mp3'; //New File Nameif(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) {
$uploadpath = $uploadpath . basename( $_FILES['fileup']['name']); // gets the file name
$sepext = explode('.', strtolower($_FILES['fileup']['name']));
$type = end($sepext); // gets extension
list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']); // gets image width and height
$err = ''; // to store the errors// Checks if the file has allowed type, size, width and height (for images)
if(!in_array($type, $allowtype)) $err .= 'Upload Failed, Invalid Extension';
if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.';
if(isset($width) && isset($height) && ($width >= $alwidth$height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x '. $alheight;
// If no errors, upload the image, else, output the errors
if($err == '') {
if(move_uploaded_file($_FILES["fileup"]["tmp_name"], "" . $newfilename)) {
echo 'Song successfully uploaded';
echo '<br />Link To Song <input type="text" class="optionstxt" readonly style="width:300px;" value="http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$newfilename.'">';
}
else echo '<b>Unable to upload the file.</b>';
}
else echo $err;
}
?> [/PHP] -
-
#slotje?
Sinds dit Illegaal is. -
Hallo, Dus ik volgde een tutorial.
Maar stuiterde op het volgende probleem.
Ik heb dus een header, ((login/member beheer header) in de top van mijn pagina.
Maar. Ipv dat hij die header weergeeft.
Geeft hij 2 errors.
CodeWarning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/u638112868/public_html/index.php:11) in /home/u638112868/public_html/index.php on line 38 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/u638112868/public_html/index.php:11) in /home/u638112868/public_html/index.php on line 38
En dit is het script, waarop het eerste zicht niks fout aan blijkt te zijn.
PHP
Toon Meer<? ob_start(); session_start( ); require_once($_SERVER['DOCUMENT_ROOT'].'/db_connect.php'); if ($_SESSION['logged_in'] != 1 && isset($_COOKIE['login_cookie'])) { list($user, $pass) = explode('[]', $_COOKIE['login_cookie']); $qu = mysql_query("SELECT `user_password` FROM `members` WHERE `username` = '".addslashes($user)."'"); if (mysql_num_rows($qu) == 1) { $passw = mysql_fetch_object($qu); if ($passw->user_password == $pass) { $_SESSION['logged_in'] = 1; $_SESSION['username'] = $user; $_SESSION['password'] = $pass; } } } if(!isset($_SESSION['username']) && !isset($_SESSION['password'])) { $_SESSION['logged_in'] = 0; $user = "Guest"; } ?>
Dus ik zou het erg waarderen, als iemand wist wat hier fout aan is.
Mvg, Fabio
-
Ik heb op google gezocht, maar dan vind ik andere Scripts.
En niet echt een preciese uitleg.Edit;
#Slotje, heb het al gefixed.
-
Hoe kan ik hiervan precies een multiple upload maken?
Forms heb ik al.
Ik zou graag dat ie 3 Files kan uploaden.
PHP
Toon Meer<?php // Simple PHP Upload Script: http://coursesweb.net/php-mysql/ $uploadpath = ''; // directory to store the uploaded files $max_size = 200000000; // maximum file size, in KiloBytes $alwidth = 90000; // maximum allowed width, in pixels $alheight = 80000; // maximum allowed height, in pixels $allowtype = array('mp3'); // allowed extensions $fileCount = (int) count(glob($uploadpath . "*.mp3")); $newfilename = 'song' . ($fileCount + 1) . '.mp3'; //New File Name if(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) { $uploadpath = $uploadpath . basename( $_FILES['fileup']['name']); // gets the file name $sepext = explode('.', strtolower($_FILES['fileup']['name'])); $type = end($sepext); // gets extension list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']); // gets image width and height $err = ''; // to store the errors // Checks if the file has allowed type, size, width and height (for images) if(!in_array($type, $allowtype)) $err .= 'Upload Failed, Invalid Extension'; if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.'; if(isset($width) && isset($height) && ($width >= $alwidth || $height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x '. $alheight; // If no errors, upload the image, else, output the errors if($err == '') { if(move_uploaded_file($_FILES["fileup"]["tmp_name"], "" . $newfilename)) { echo 'Song successfully uploaded'; echo '<br />Link To Song <input type="text" class="optionstxt" readonly style="width:300px;" value="http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$newfilename.'">'; } else echo '<b>Unable to upload the file.</b>'; } else echo $err; } ?>
-
Hallo,
Is er een Script, Die alle .mp3 files, weergeeft in een lijst?
Bedankt.
mvg, Gamesongz
-
ik heb er ondertussen dit van gemaakt.
Bedankt voor alle hulp!
Alleen vroeg ik mij af, als het mogelijk is. een Lijst te hebben met alle .mp3 files.[PHP]<?php
// Simple PHP Upload Script: http://coursesweb.net/php-mysql/$uploadpath = ''; // directory to store the uploaded files
$max_size = 200000000; // maximum file size, in KiloBytes
$alwidth = 90000; // maximum allowed width, in pixels
$alheight = 80000; // maximum allowed height, in pixels
$allowtype = array('mp3'); // allowed extensions
$fileCount = (int) count(glob($uploadpath . "*.mp3"));
$newfilename = 'song' . ($fileCount + 1) . '.mp3'; //New File Nameif(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) {
$uploadpath = $uploadpath . basename( $_FILES['fileup']['name']); // gets the file name
$sepext = explode('.', strtolower($_FILES['fileup']['name']));
$type = end($sepext); // gets extension
list($width, $height) = getimagesize($_FILES['fileup']['tmp_name']); // gets image width and height
$err = ''; // to store the errors// Checks if the file has allowed type, size, width and height (for images)
if(!in_array($type, $allowtype)) $err .= 'Upload Failed, Invalid Extension';
if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.';
if(isset($width) && isset($height) && ($width >= $alwidth$height >= $alheight)) $err .= '<br/>The maximum Width x Height must be: '. $alwidth. ' x '. $alheight;
// If no errors, upload the image, else, output the errors
if($err == '') {
if(move_uploaded_file($_FILES["fileup"]["tmp_name"], "" . $newfilename)) {
echo 'Song successfully uploaded';
echo '<br />Link To Song <input type="text" class="optionstxt" readonly style="width:300px;" value="http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$newfilename.'">';
}
else echo '<b>Unable to upload the file.</b>';
}
else echo $err;
}
?> [/PHP] -
& $filecount moet zijn :X?