Jump to content

$cripts

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

$cripts's Achievements

Member

Member (2/5)

0

Reputation

  1. need to explain ur problem a bit better and u have no default value....
  2. i found this a while back dont remeber where from but even if magic quotes is enabled u still need to check everything a user inputs this will filture out everything function cleanstring($string) { $search = array ('@<script[^>]*?>.*?</script>@si', // Strip out javascript '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@([\r\n])[\s]+@', // Strip out white space '@&(quot|#34);@i', // Replace HTML entities '@&(amp|#38);@i', '@&(lt|#60);@i', '@&(gt|#62);@i', '@&(nbsp|#160);@i', '@&(iexcl|#161);@i', '@&(cent|#162);@i', '@&(pound|#163);@i', '@&(copy|#169);@i', '@(\d+);@e'); // evaluate as php $replace = array ('', '', '\1', '"', '&', '<', '>', ' ', chr(161), chr(162), chr(163), chr(169), 'chr(\1)'); return preg_replace($search, $replace, $string); }
  3. try this $timestamp = mktime($hour,$minute,$second,$month,$day,$year);
  4. long way... create on long if statement for it using an array for each element ( days ) for each sign and months
  5. you can use this script i wrote a simple little pagination but it uses a range so u can put a range of 4 and it go 1 2 [ 3 ] 4 5 function pages($url,$total_items,$per_page,$range,$current_page) { // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_items / $per_page); $range = ceil($range / 2); if($current_page != 1) { $return = '[<a href="'.$url.'p=1" title="Go to page 1 of '.$total_pages.'"> « </a>]'; } if($current_page > 1){ $prev = ($current_page - 1); $return .= '<a href="'.$url.'p='.$prev.'" title="Go to page '.$prev.' of '.$total_pages.'"> « </a>'; } // Build Backward Links for($i = 1; $i <= $range; $i++){ $p = $current_page-$i; if($p > 0) { $back .= $p.','; } } $back_rev = strrev($back); $back_rev = explode(',',$back_rev); foreach($back_rev as $rev) { $rev = strrev($rev); $return .= ' <a href="'.$url.'p='.$rev.'" title="Go to page '.$rev.' of '.$total_pages.'">'.$rev.'</a> '; } $return .= ' [ <b>'.$current_page.'</b> ] '; for($i = 1; $i <= $range; $i++){ $p = $current_page+$i; if($p <= $total_pages) { $return .= '<a href="'.$url.'p='.$p.'" title="Go to page '.$p.' of '.$total_pages.'">'.$p.'</a> '; } } // Build Next Link if($current_page < $total_pages && $total_pages != '0') { $next = $current_page + 1; $return .= '<a href="'.$url.'p='.$next.'" title="Go to page '.$next.' of '.$total_pages.'"> » </a>'; } if($current_page != $total_pages && $total_pages != '0') { $return .= '[ <a href="'.$url.'p='.$total_pages.'" title="Go to page '.$total_pages.' of '.$total_pages.'"> » </a> ]'; } return $return; }
  6. i really see no point in doing this but try caching
  7. you could run a cronjob for this and store that variable for later use if thats what your trying to do
  8. u can still use pagination simply do it like this $query = mysql_query('SELECT ....... LIMIT 5,20'); while(.........) { $array[$id] = $idortext; } shuffle($array); foreach($array ...... ) { echo ......; } the only thing about using shuffle is if you need to keep the array keys they will be changed
  9. get all values put them into an array then output them using shuffle
  10. because ini_get will only retrieve the value of a php setting ini_get(setting_name); u need to use ini_set(setting_name,value);
  11. try this asd; print_r(error_get_last()); and see if it outputs anything if it doesnt work put this at the top of your page and try again error_reporting(E_ALL ^ E_NOTICE); and try again
  12. put it in the uploader script it will change the maximum upload size in the php.ini file and it will be ini_set('upload_max_filesize',whateversizeinbytes); it will need to be in the upload script because once the script is done executing it will reset back to its default value
  13. header("form1.php?package={$_GET['package']}&pack={$_GET['pack']}");
×
×
  • 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.