wrong...
for some reason
I am still getting this with it on
Code: Select all
<?php
if($submit) //If submit is hit
{
mail(
Warning: Unexpected character in input: '' (ASCII=92) state=1 in C:apache2triadhtdocsjcartonline.comhtmlincfunctions.php(14) : regexp code on line 7
Warning: Unexpected character in input: '' (ASCII=92) state=1 in C:apache2triadhtdocsjcartonline.comhtmlincfunctions.php(14) : regexp code on line 7
"youremailhere", $subject, $email, $comments);
}?>
?>Code: Select all
<?php
"youremailhere", $subject, $email, $comments);
?>here is my code for processing the code..
Code: Select all
<?php
class tutorials {
function phphighlight($rawcode,$view)
{
$rawcode = addslashes($rawcode);
if ($view == "tutorial")
{
//$output = preg_replace("/\[ php]([^[]*)\[\/ php]/ime",
// "'<br><br><b>PHP:</b><table style="width: 100%; color: #000; background-color: #FFF; border: 2px solid #808080; font-size: 8pt;"><tr><td style="padding: 10px";>'.highlight_string('\\1',true).'</td></tr></table><br>'",
// $rawcode);
$output = preg_replace('|\[ php](.*?)\[ /php]|ise',"highlight_string('\\1',true)", $rawcode);
$output = preg_replace("/\[html]([^[]*)\[\/html]/ime",
"'<b>HTML:</b><table style="width: 100%; color: #000; background-color: #FFF; border: 2px solid #808080; font-size: 8pt;"><tr><td style="padding: 10px";><html>'.highlight_string('\\1',true).'</html></td></tr></table><br>'",
$output);
$output = preg_replace("/\[js]([^[]*)\[\/js]/ime",
"'<br><br><b>Javascript:</b><table style="width: 100%; color: #000; background-color: #FFF; border: 2px solid #808080; font-size: 8pt;"><tr><td style="padding: 10px";>'.highlight_string('\\1',true).'</td></tr></table><br>'",
$output);
}
else
{
$output = $rawcode;
}
$output = stripslashes(nl2br($output));
echo $output;
}
}
?>