I have this code and i'm trying to echo it into a textarea but it does not work.... after the text area it goes out on the main page and does not stay in the textarea is should be showing in... how can i fix this??
if (isset($_COOKIE['RLNZ'])) { echo " <div align='center'> <form method='POST' action='index.php?Page_ID=27'> <fieldset style='padding: 2'> <legend><font color='#000000' size='2'>Send Message </font> </legend> <table border='0' width='100%' id='table6'> <tr> <td bgcolor='#CCCCCC'><input type='text' name='subject' size='57'><p><textarea rows='8' name='message' cols='49'></textarea></p> <p align='center'> <font size='1' face='Verdana' color='#ffffff'> <input type='submit' value='Send Message' name='B1'> </font> <font size='2' face='Verdana' color='#000000'> Send to:</font><font size='1' face='Verdana' color='#ffffff'> <select size='1' name='D1'>"; $result2 = mysql_query ('SELECT * from members order by username desc'); while ($row2 = mysql_fetch_array($result2)) { echo "<option value=' $row2[id] '> $row2[username] </option>"; } echo "</select></font></td> </tr> </table> </fieldset><p align='left' style='margin-top: 0; margin-bottom: 0'> </p> </form> <p align='left' style='margin-top: 0; margin-bottom: 0'> </p> </div>"; } else { }
Um, what are you putting in a textarea? Are you talking about the
<textarea rows='8' name='message' cols='49'></textarea>
bit?
Or do you mean you want to put all that HTML into a textarea to be edited? [man]htmlspecialchars[/man].
I think the problem is this line:
<td bgcolor='#CCCCCC'><input type='text' name='subject' size='57'><p><textarea rows='8' name='message' cols='49'></textarea></p>
You closed the textarea. Try replacing '<' with '<' and '>' with '>'. Not sure if this is the problem, but it looks like it.
EDIT: Or you could use the function weedpacket gave. 🙂
In my page which i show this i have this
<textarea rows="20" name="HTML" cols="84"><?php echo $row
; ?></textarea> the echo is the code in my top post. It opens the textarea in the echo code but the rest of the script shows as it would in the page not in the textarea
See reply above.