Jump to content

rinkhals

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rinkhals's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey man, thanks, that worked perfectly. I really appreciate it
  2. Hey guys, I realise that the problem is probably absolutely blatant but I just can't, for the life of me, see it. Here is the error: "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [file] on line 168" Here is the line of PHP its pointing to [code] while($row = mysql_fetch_array($sql)){ [/code] and here is the line with the actual query in it. [code] $sql = mysql_query("SELECT * FROM `topics` ORDER BY `timestamp` WHERE `id` = '$cid' DESC LIMIT $from, $to"); [/code] If anyone could even just point me in the direction of knowing where my error is, it would be greatly appriciated. Thanks Rinkhals
  3. No, I don't know what line of code it is, I keep getting a 500 Internal Server Error when I run this code and it seems only this code. I have already checked the various folders permissions and theey are correct.
  4. Hey guys, I keep getting an internal server error and I have checked everything that my hosts suggest which leaves only my code. I have worked it out to a certain potion of code and for the life of me I can't see to find the error, can anyone else skim through it and see if they find anything that might help. I know this isn't the best bit of upload code around but I am the only one who will ever have access to it. I really appreciate any help [code] if (isset($_POST['addfile'])){ $error = 0; $catid = $_POST['category']; $bigimg_path = "/address/photos/img/"; $linkimg_path = "/address/photos/linkimg/"; $bigimg_path = $bigimg_path . basename( $_FILES['bigfile']['name']); $linkimg_path = $linkimg_path . basename( $_FILES['linkfile']['name']); $bigimg = "http://address/photos/img/". basename( $_FILES['bigfile']['name']); $linkimg = "http://address/photos/linkimg/".basename( $_FILES['linkfile']['name']); if(move_uploaded_file($_FILES['bigfile']['tmp_name'], $bigimg_path)) {     echo "The large file ".  basename( $_FILES['bigfile']['name']).     " has been uploaded<br />"; } else{     echo "There was an error uploading the large file, please try again!";     $error = 1; }; if(move_uploaded_file($_FILES['linkfile']['tmp_name'], $linkimg_path)) {     echo "The link file ".  basename( $_FILES['linkfile']['name']).     " has been uploaded"; } else{     echo "There was an error uploading the link file, please try again!";     $error = 1; }; if ($error == 0) { $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die('Error connecting to mysql'); mysql_select_db($dbname,$conn);     $query = "INSERT INTO galimg (catid, img, linkimg) VALUES ('$catid', '$bigimg', '$linkimg')";     mysql_query($query) or die('Error, query failed');     mysql_close($conn); }; }; [/code] Grae
×
×
  • 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.