Month: February 2011

Including external Javascript and CSS files in PHP

Naveen Nayak February 10, 2011 6 Comments Web Development

Here is how to include external javascript and css files in your php code <?php //include CSS Style Sheet echo “<link rel=’stylesheet’ type=’text/css’ href=’path-to-css-file’ />”; //include a javascript file echo “<script type=’text/javascript’ src=’path-to-javascript-file’></script>”; ?> If you want to include the javascript and css source code inside the php file itself then you can do it […]

PHP Email With Attachment

Naveen Nayak February 8, 2011 1 Comment Web Development

How to send an email with an attachment in PHP <?php //email details ( change accordingly) $to = “to-email-address@domain.com”; $from = “from-email-address@domain.com”; $subject = “Test Email with an attached file”; $message = “<p>Test Email – Check if the file is attached properly</p>”; //select a random hash to send MIME content $hash = md5(time()); //carriage return […]

Page 1 of 1