HTML mail() Sending as Plain Text

[code lang=”php”] $to = “[email protected]”; $subject = “SUBJECT”; $message = “MESSAGE“; $headers = ‘MIME-Version: 1.0’ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”; $headers .= ‘From: Mailer ‘ . “\r\n”; mail($to, $subject, $message, $headers); [/code] The above code does not always send emails in HTML as it should, it Read more…

By Andrew Odendaal, ago

Stop mouse click in browsers

There have been multiple ways to stop your user/s from right clicking on your site, but many of them now fail due to the way firefox’s contextual menu loads. Below is an example of how to do it: [code lang=”javascript”] function _c(e) {if (document.all) {if (event.button==2||event.button==3) {return false;}} else {if Read more…

By Andrew Odendaal, ago

Transparent swf in html

So you have now placed a swf file into your html page and you want to be able to see through it. Lucky for you, this is a very easy thing to do! The following code does the trick: [code lang=”html”] [/code] Notice that by just adding the ‘wmode’ and Read more…

By Andrew Odendaal, ago

htaccess ErrorDocument

Create a file called .htaccess in the root of your public_html/htdocs of your domain. Inside add the following text: [code lang=”c”] Options +FollowSymLinks AddDefaultCharset UTF-8 RewriteEngine on Options +FollowSymLinks AddDefaultCharset UTF-8 RewriteEngine on ErrorDocument 404 /index.php ErrorDocument 301 /index.php [/code] With the index.php files being the pages that get redirected Read more…

By Andrew Odendaal, ago

How to correctly form HTML

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ /> <script type=”text/javascript” src=”javascript/javascriptfilename.js”></script> <title>Title goes here</title> <link href=”stylesheetname.css” rel=”stylesheet” type=”text/css” /> </head> <body> Page content goes here </body> </html>

By Andrew Odendaal, ago

Trying to get variables into flash from the browser!

Ever wondered how to get variables from an html page to a flash element? Well, it’s quite easy using the following actionscript 2 example: I use javascript to embed my flash elements: <embed src=”somefilename.swf?varname=varvalue&vartwo=var2value” width=”550″ height=”400″></embed> Now in Flash I can just call: _root.varname and it will give us `varvalue` Read more…

By Andrew Odendaal, ago