im trying to write a php app for my forums so when a user posts a message that has some programming code in it
they can click on a link i plan on setting up that has a text box for them to paste the code into and hit a button (well call it submit)
after they hit the button then the code is read and the syntax of this code is colorized much like Crimson editor does for its differant sytanx
programming the checking of the code isnt my problem im having trouble figureing out a way to make it so when they inpute it it gets sent to a php program to be checked and then sent back with the proper color tages
so if they were to enter in the text box
<?php
// blah blah blah
then soem more crap here
?>
they then hit submit the program checks it and sees the syntax for php so it coloriz's it as php syntax and sends back the text liek this
<?php
// blah blah blah
then some more crap here
?>
and the code would looke liek this the [] are () so it doesnt show colors in this part but the code will be with the []
<?(color=blue)php(/color)
(color=green)// blah blah blah(/color)
then some more crap here
?>
and then when they copy and paste it into the forum its then colorized as php syntax
any ideas or a tutorial on how to get a CGI script to call a php file to runs checks would be great
thanks