taith
Members-
Posts
1,514 -
Joined
-
Last visited
Everything posted by taith
-
i know i need these to transfer id, class, color, size, face and... just because i know i'll need it... i also need to make one going back.
-
i want to change all "font" classes to "span style="""
-
Is it possible to target table or something in PHP?
taith replied to ztealmax's topic in PHP Coding Help
[code] <a href="pagename.php"><?=$tablename?></a> [/code] -
does anybody have a funtion that would change [code]<font color=""></font>[/code] into [code]<span style="color:;"></font>[/code] or any clues as to where should start to build one ?
-
$_POST[] vars are [u]read only[/u] you cant activly create/change/alter/delete these vars other then by a form, or by changing to a different page.
-
it has script tags... and no, no errors... why doesnt ajax load script?
-
question... when i load my wysiwyg directly(without ajax) it loads perfectly fine, but when i try loading with ajax, nothing shows... any ideas? it seems that ajax loaded files wont run any onload javascript... i can include some code if you want... but theres lots of it...
-
[code]<?php function TimeAgo($timestamp){ $current_time = time(); $difference = $current_time - $timestamp; $periods = array("minute", "hour", "day", "week", "month", "year", "decade"); $lengths = array(60, 3600, 86400, 604800, 2630880, 31570560, 315705600); for($val = sizeof($lengths) - 1; ($val >= 0) && (($number = $difference / $lengths[$val]) < 1); $val--); if($val < 0) $val = 0; $new_time = $current_time - ($difference % $lengths[$val]); $number = floor($number); if($number != 1) $periods[$val].= "s"; $text = sprintf("%d %s ", $number, $periods[$val]); if(($val >= 1) && (($current_time - $new_time) > 0)) $text .= TimeAgo($new_time); return $text; } echo TimeAgo('6435421'); ?>[/code]
-
[SOLVED] Redirecting my users to diferent page depending on browser!
taith replied to saigon's topic in PHP Coding Help
[code] <? function get_mybrowser(){ if(strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko')){ if(strpos($_SERVER['HTTP_USER_AGENT'], 'Netscape')) return 'netscape'; elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')) return 'firefox'; else return 'mozilla'; }elseif(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')){ if(strpos($_SERVER['HTTP_USER_AGENT'], 'Opera')) return 'opera'; else return 'ie'; }else return 'other'; } switch(get_mybrowser()){ default: header('Location: unauthor.php'); break; case "ie": header('Location: unauthor.php'); break; } ?> [/code] -
thats it! str_replace... lol... knew i was doin somin wrong ;-) thanks :-P
-
trying to remove all ,'s from a string, but i get a nice error... [code] $i= preg_replace(",", '', $i); [/code] Warning: preg_replace() [function.preg-replace]: No ending delimiter ',' found in /home/.sites/16/site168/web/taith/md5.php on line 3
-
what is this supposed to do? what is it doing?
-
as much as you might not like ie, 70%+ of people use it... so you do need it to work.
-
well... theres your problem... $picture1 has no value... you have to set it somewhere...
-
nonono... look at the page, right click, view source. find that line... that'll tell you why its not showing...
-
ya... but if you view your source your [code] <img src=""> [/code] does $picture1 have value?
-
what gets outputted to your sourcecode?
-
[code] <?php if($handle = opendir(".")){ while(false !== ($file = readdir($handle))){ if(($file!='.')&&($file!='..')){ $files[filemtime($file)]=$file; } } closedir($handle); } sort($files); foreach($files as $file) echo "$file<br>\n"; ?> [/code] or just [code] $file=explode('=>',$file); echo trim($file[1]); [/code]
-
[code] <?php if($handle = opendir(".")){ while(false !== ($file = readdir($handle))){ $files[]=$file; } closedir($handle); } ksort($files); foreach($files as $file) echo "$file<br>\n"; ?> [/code]
-
no... php doesnt have the ability(that i know of) to forcevly stop in the middle of a script, the only way of doing it would be to split the script up into sections [code] switch($_GET[stage]){ default: #first stage, then header to stage 2 break; case "stage2": yes|no break; case "no": redirect break; case "stage3": #continue break; } [/code]
-
new window - reference form entries in original without submitting
taith replied to chiprivers's topic in PHP Coding Help
lol... but ajax is the greatest thing since sliced bread ;-) and not that hard to set up... lol -
new window - reference form entries in original without submitting
taith replied to chiprivers's topic in PHP Coding Help
true... but i was talking about doing it without reloading the page...