Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. sorry... typo [code]function echo_rooms_button(){ $get_room_types_qr = "SELECT * FROM rooms"; $get_room_types = mysql_query($get_room_types_qr); for($i =0 ; $i < mysql_num_rows($get_room_types); $i++){   $type = mysql_result($get_room_types,$i,"type");   $fee = mysql_result($get_room_types,$i,"fee");   $return .= '<label>'.$type.'->'.$fee.'<input name="rooms" type="radio" value="'.$type.'" /></label><br>'; } return $return; }[/code]
  2. well yes... you already have php open... [code] while ($row = mysql_fetch_array($result)){ echo '<a href="view_profile.php?user_name='.$user_array['user_name'].'"><br>'; } [/code]
  3. [code]function echo_rooms_button(){ $get_room_types_qr = "SELECT * FROM rooms"; $get_room_types = mysql_query($get_room_types_qr); for($i =0 ; $i < mysql_num_rows($get_room_types); $i++){   $type = mysql_result($get_room_types,$i,"type");   $fee = mysql_result($get_room_types,$i,"fee");   $retun .= '<label>'.$type.'->'.$fee.'<input name="rooms" type="radio" value="'.$type.'" /></label><br>'; } return $return; }[/code]
  4. what errors are you getting?
  5. change the field in the database to a text field, that shouldnt have any limits on character lengths.
  6. that'll show ya all the array in one string [code]$show_extensions = array( 'php' , 'htm' , 'html' , 'shtm' , 'shtml' , 'jpg' , 'jpeg' ); $show_extensions = implode(", ", $show_extensions); echo $show_extensions;[/code]
  7. do you have a charlimit in the database? seems to set to 25, try changing it from varchar to text
  8. you still need to query that... [code] $adverts_seen_query = "SELECT * FROM adverts_hits WHERE adverts_hits_website='1' AND adverts_hits_user='1'"; $result=mysql_query($adverts_seen_query); $adverts_seen_rows = mysql_num_rows($result);     echo $adverts_seen_rows; [/code]
  9. http://us3.php.net/manual/en/language.operators.comparison.php
  10. another way... kills all open sessioned variables without destroying the session itself. [code] $_SESSION=array(); [/code]
  11. for some reason, this is loading once, but is not repeating... any ideas? [code] <s c r i p t> setTimeout(MyAjaxRequest('chat','hello.php?state=chatbox'),20); </script> [/code] i should be able to do that no? or do i need to build a timer?
  12. here... use this for every redirect... i'll save LOTS of time and agrivation... [code]<? function redirect($filename=".?op=main",$delay="0",$die="0"){ if((!headers_sent())&&($delay=="0")) header('Location: '.$filename); elseif($delay=="0"){   echo '<script type="text/javascript">';   echo 'window.location.href="'.$filename.'";';   echo '</script>';   echo '<noscript>';   echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';   echo '<noscript>'; }else echo '<meta http-equiv="refresh" content="'.$delay.';url='.$filename.'" />'; if($die=="0") exit; } ?>[/code]
  13. enjoy... that'll limit how many words in the string, if over the max, i'll cut after the last word and add '...' [code]<? function filter_wordlimit($string, $length=50, $ellipsis='...'){ return count($words = preg_split('/\s+/', ltrim($string), $length + 1)) > $length ? rtrim(substr($string, 0, strlen($string) - strlen(end($words)))) . $ellipsis : $string; } ?>[/code]
  14. the only thing i could think of would be having them use blank variables [code] <input type=text value="<?=$_GET[var]?>"> [/code] then you just set that variable into your links...
  15. [code] <? foreach($world as $k=>$v) $$k=$v; ?> [/code] and there ya go... your array just turned into a whole wack of variables...
  16. when you put the @ symbol infront of any command/funtion... it hides any and all errors that that function may make.
  17. if your looking to make them changes without reloading the page, your gunna want to look for javascript, or ajax, else, you just need a little creativity.
  18. if you put month, year in there, it'll tell you how many days are in that month. [code]<? function get_daysinmonth($month, $year){ if(checkdate($month, 31, $year)) return 31; elseif(checkdate($month, 30, $year)) return 30; elseif(checkdate($month, 29, $year)) return 29; elseif(checkdate($month, 28, $year)) return 28; return FALSE; } ?>[/code]
  19. ok... never mind... i got it fixed :-)
  20. nope... then it doesnt find anything... ever ps. you made a typo [code] $result = mysql_query("SELECT * FROM instantmessenger WHERE `state`='0' AND (`uid2`='$id' OR `uid1`='$id')") or die(mysql_error()); [/code]
  21. there is no way of decrypting md5 as of yet. if you dont like that answer... i can give you the source code for the md5 encrypt... if you can break it... be my guest.
  22. when i do this, i get results regardless if state is 1 or 0 [code] $result = mysql_query("SELECT * FROM instantmessenger WHERE `state`='0' AND `uid2`='$id' OR `uid1`='$id'") or die(mysql_error()); echo mysql_num_rows($result); [/code]
  23. right... sorry bout that... [code]<br>[/code]
×
×
  • 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.