Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. lol... right... no , after rand()... lol
  2. not tested... but it should work :-) <?php $query=mysql_query("SELECT id FROM Mark WHERE id>0 ORDER BY rand(), LIMIT 1"); $row=mysql_fetch_assoc(); print_r($row); ?>
  3. what type of field is tgl_pr? $time=time(); mysql_query("insert into pr (no_pr,tgl_pr,kd_cust) values('$nopesanan', '$time','$cbocust')") or die(mysql_error());
  4. just in your database, make either a text field, and fill it with a time(), or make a timestamp field
  5. if you die(print_r($_POST)); you shouldnt see it if its not checked... however... if your storing the information via a session/database, since its not transmitting an off value, its simply not changing it... not that its changing it to on...
  6. lol... i wish! problem with checkboxes, is that if checked, they transmit on(or whatever you put for value=""), if their not checked, they dont transmit anything. so if checked, post=array(checkbox=>"on"), if not checked, post=array()... so you'd need to set a loop, to unset() all the ones, that arnt checked
  7. then theres your problem... $file_tmp = $new_file['tmp_name']; doesnt exist... therefore, empty, therefore, !is_uploaded_file().
  8. try changing echo "File $i: Not selected.<br>"; to echo "File $file_tmp: Not selected.<br>"; might give ya a more... helpful error... lol
  9. you need to session_start() at the top of your page there... starting a session on only 1 page doesnt start it on all pages...
  10. sweet deal... cuz i found a few ways to block curl just making sure i wont be blocking the big guys... lol
  11. about there trolling... do search engines use cURL to periodically scan pages? or do they do it some other way?
  12. if((stripos($_SERVER[“$HTTP_USER_AGENT”], “opera”)) || (stripos($_SERVER[“$HTTP_USER_AGENT”], “safari”))){ echo '<link rel="stylesheet" type="text/css" href="operasafari.css" />'; }
  13. function getHTML($website) { $url = parse_url($website); $url['path'] = substr($url['path'], 0, 1) == "/" ? $url['path'] : "/" . $url['path']; $handle = fsockopen($url['host'], 80); $request = "GET {$url['path']} HTTP/1.1\r\n"; $request .= "Host: {$url['host']}\r\n\r\n"; fputs($handle, $request, strlen($request)); $response = ""; while (!feof($handle)) $response .= fgets($handle, 1024); print strip_tags($response,'<img>'); }
  14. taith

    safari

    woah... thanks! zyrax one there is huge! :D
  15. i should mention that including a css file wont do anything ;-) you need your html to link to it ;-)
  16. date()'s 2nd variable MUST be in unix timestamp form(time())... you'd need to strtotime() your preset time, then put it into date();
  17. theres two sure fire ways of stopping any injection, which is a HUGE security risk... 1) addslashes(strip_tags($string)); 2) htmlentities($string,ENT_QUOTES); putting either of them onto any/every form variable... ALWAYS... i repear... always always always protect $_POST/$_GET variables!
  18. taith

    safari

    thank ya kindly!
  19. taith

    safari

    easy question... can anybody on safari echo $_SERVER['HTTP_USER_AGENT']; and pass that here? lol... forgot to add that one onto my browser detect function... lol
  20. a) out of the 4... strpos is the fastest but the others will work also :-) and yes... if(($browser=='opera')||($browser=='safari')){ }
  21. welll theres your problem... <?php echo filter_charlimit($row_news['article01_para1'],150); ?>
  22. taith

    Ownership

    agreed... if contract doesnt state it, they pay you to make the script, not buying the script off you...
×
×
  • 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.