PHP Code

How to highlight the source code in our php application?

Hi friends, In our php application some times we want to highlight the source code to user friendly , so the following function helped you to highlight the source code. <?php if (!empty($_POST[’text’])){ echo ‘<div style="border: solid 1px red; width:300px;height: 150px; padding: 20px; margin: 20px">’; highlight_string(stripslashes($_POST[’text’])); echo ‘</div>’; } ?> <form action="<?php echo $_SERVER[‘PHP_SELF’]?>" method="post"> …

Continue Reading
PHP Code

How to send external html content mail using php?

Hi, The following code will work, this functionality is use the external html content as email body. And send mails with neatly formatted html content using simple php mailer class. PHP Code $mail = new PHPMailer(); $mail->IsMail(); $mail->Timeout  = 360; $mail->From = ""; $mail->FromName = ""; $mail->AddReplyTo(“”); $mail->AddAddress($Email); $mail->IsHTML(true); $mail->Subject = "Html as email"; $file …

Continue Reading