PHP: check string has HTML tags


you may think as the best way to check a string has HTML tags is to check the string after stripping tags: if( strlen($string) != strlen(strip_tags($string)) ){ echo 'Contains HTML tags'; } But, the best way is to use regular expressions: if (preg_match("/([\<])([^\>]{1,})*([\>])/i", $string )) { echo 'Contains HTML tags'; }

Flash objects overlay problem


How to make flash objects overlaid by another html elements? simply by using the wmode attribute and set it to transparent wmode - Possible values: window, direct, opaque, transparent, gpu. Sets the Window Mode property of the SWF file for transparency, layering, positioning, and rendering in the browser. If this attribute is omitted, the default value is "window". For more … Continue reading Flash objects overlay problem

SWF flash files ignore stacking order, play on top of DHTML layers


Issue A SWF file in a layer on a DHTML page containing several layers displays above all the layers regardless of the layers' stacking order ("z-index"). Solution Use the WMODE parameter to allow layering of rich media content with DHTML layers. The WMODE parameter can be "window" (default), "opaque," or "transparent." Using a WMODE value … Continue reading SWF flash files ignore stacking order, play on top of DHTML layers

Don’t put a form inside a table


Don't put a form inside a table, instead put table inside form Wrong approach: <table> <form id="form-id" method="POST" action"action.php"> <tr><td><!--  form inputs --> </td></tr> </form> </table>   Correct approach:         <form id="form-id" method="POST" action"action.php"> <table> <tr><td><!--  form inputs --> </td></tr> </table> </form>   If you put the form inside the table, the … Continue reading Don’t put a form inside a table