taith
Members-
Posts
1,514 -
Joined
-
Last visited
Everything posted by taith
-
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]
-
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]
-
[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]
-
what errors are you getting?
-
change the field in the database to a text field, that shouldnt have any limits on character lengths.
-
you didnt close the last }
-
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]
-
do you have a charlimit in the database? seems to set to 25, try changing it from varchar to text
-
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]
-
http://us3.php.net/manual/en/language.operators.comparison.php
-
another way... kills all open sessioned variables without destroying the session itself. [code] $_SESSION=array(); [/code]
-
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?
-
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]
-
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]
-
Is it possible to complete a form on someone elses site with PHP
taith replied to liam1412's topic in PHP Coding Help
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... -
[code] <? foreach($world as $k=>$v) $$k=$v; ?> [/code] and there ya go... your array just turned into a whole wack of variables...
-
when you put the @ symbol infront of any command/funtion... it hides any and all errors that that function may make.
-
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.
-
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]
-
Script showing the date, one hour ahead of what it should
taith replied to Logitek's topic in PHP Coding Help
what should it be showing? -
ok... never mind... i got it fixed :-)
-
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]
-
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.
-
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]
-
right... sorry bout that... [code]<br>[/code]