hi when you want to give your users a peice of code to place on their site how do you do that? because codes are usually executed before displaying you know thanks
using codes inside the <textarea> tags will not execute them. Hope you get an idea and try working on it. Good luck .
thanks i want to give them this code ( please notice the php variabes) <p align=center> <form method=POST action="<?php echo "http://domain.tld/search.php?searchid=$searchid&publisher=$publisher";?>" > <input type=text size="<?php echo $size; ?>" name="q"> <input type=submit value="Search the Web" name=submit> </form> </p> HTML:
you could try this : $somthing = '<p align=center><form method=POST action="http://domain.tld/search.php?searchid='.$searchid.'&publisher='.$publisher"> <input type=text size="$size" name="q"> <input type=submit value="Search the Web" name=submit></form></p>' ; PHP: and make a textarea for example : Here's your code : <TEXTAREA NAME="code" COLS=40 ROWS=6> <? echo $something ?> </TEXTAREA> PHP: Debug it yourself since i haven't tested it . good luck again.
yes .Php codes are executed in all browsers inside the textarea . even in my example , $something is a php code inside the textarea and gets executed to display the result. Anyway , I'm glad you got it working.
you could use the <code> tag in html. Then just have to convert all the code to show up (so using < instead of < and so on for all html special characters), this is what I do, so it will validate correctly.