Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. heres a GD lib example
  2. #1 please use the code tags #2 use the GD lib for resizing #3 if you want someone you write it for you see the freelance section
  3. yep, but you missed the ; on the $user = "test1" change to $user = "test1";
  4. try $sql = "DELETE FROM album, song USING album, song WHERE album.albumid=$albumid";
  5. Cool can you click solved please
  6. and the problem is ?
  7. ok well that regex isn't making sense to me, also what are you trying to search for ?
  8. Heres some example, i hope they help <?php $user = "test1"; $theField = "Pokemon"; mysql_query("INSERT INTO Brandon (Pokemon) VALUES ('some data')"); //or mysql_query("INSERT INTO Brandon (Pokemon) VALUES ('$user')"); //insert test1 //or mysql_query("INSERT INTO Brandon ($theField) VALUES ('$user')"); //insert test1 ?>
  9. your right, yeah when i started that logic caugth me, but you sql statement was used and your using a pointer to it but yep you got it now good luck and remember to click solved
  10. Quick append script (UNTESTED) someone may post a better one or theirs the freelance section either why it may help <?php addtofile(".htaccess","line to add"); function addtofile($n,$d) { $f=@fopen($n,"a"); if (!$f) { return false; } else { fwrite($f,$d); fclose($f); return true; } } ?>
  11. counting is the easy option i assume the "next10" will pass the count from var, it if your on 20 and click next10 it passes either 20 or 30 (depends on your code) then just use the var thats used on the LIMIT + count
  12. What are you trying to insert ? whats the table name, field and data ? PS don't used echo just use the varible ie mysql_query("INSERT INTO TABLENAME (FIELD) VALUES ('$data')");
  13. erm.. the code that uploads the file the code that sets $directory & $tbl_images & $userdir & $imgdir & $PICSnum & $profile_id & $auth the code for the page with the error (displaying nothing) aka showpic.php meah.. good luck
  14. i still think i am missing something!! <?php //<---Added********************* //**************** function showGrid($feature) { $featureresult = @mysql_query("SELECT * FROM matrix WHERE productcode = '$feature' LIMIT 1"); $featureItem = mysql_fetch_array($featureresult); $otherresult = @mysql_query("SELECT * FROM matrix WHERE productcode != '$feature' ORDER BY rand()"); $otherItems = mysql_fetch_array($otherresult); ?> <center> <table border="1"> <tr> <?php $upper=1; $int = 0; //CHANGED BELOW********************* $num = mysql_num_rows($otherresult) + 1; //(to include the feature). for($i=0; $i < $num; $i++) //while($otherItems = mysql_fetch_array($otherresult)) /////// this is where the problem is!!! //CHANGED ABOVE********************* { $otherItems = mysql_fetch_array($otherresult); if($upper==1) { if($int==2) { echo "<td rowspan='2' colspan='2' width='250' height='304' align='center'>" . $featureItem[brand] ."</td></tr><tr>"; $int++; } elseif($int==4) { echo "<td width='125' height='152' align='center'>" . $otherItems[brand] ."</td></tr>"; $upper=0; $int++; } else { echo "<td width='125' height='152' align='center'>" . $otherItems[brand] ."</td>"; $int++; } } else { if($int%4 == 1) { echo "<tr>"; } echo "<td width='125' height='152' align='center'>" . $otherItems[brand] ."</td>"; if($int%4 == 0) { echo "</tr>"; } } }?> </tr> </table> </center> <?php } //end function SHOWGRID
  15. as i said
  16. my last post was for an MySQL Query, to clean up the input to the database you can use addslashes($data) if you did want to clear out the quotes via ereg_replace (not need with add slashes) but i think this would do it $data = "hello's" $result = ereg_replace("\"'", '', $data);
  17. i don't seam to see the problem, why not use echo $array[$i] or a foreach (loop)
  18. erm.. you lost me, redirect use to his own database..
  19. can you do a <?php print_r($array); ?> and also show some code as we don't have much to work with
  20. Coolie can you click solved (if thats the case)
  21. does your database hold valid data, as you seam to be missing some code, from what i can see (without code tags)
  22. can you post all your lastest code please, i'll review it in Code Tags aka #
  23. lol oops $renamed_photo = $random_number.".".substr($_FILES["image1"]["name"],strlen($_FILES["image1"]["name"])-3,3); updated
×
×
  • 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.