Jump to content

Auto Storing The formatting in Text Fields?


Accurax

Recommended Posts

Here is an example of my code:

[code]
  <table align ="center" id="description_tab">
<tr>
  <td>
  <form method="POST" action= "update_bandtype.php">
    <textarea name="intro" cols="50" size="100"></textarea>
  </form>
</td>
</tr>
<tr>
<td colspan="2" align ="center"><input name="submit" type="submit" value="Update" /></td>
</tr>
  </table>[/code]

The above form submits the entered text into a MYsql database, and i make queries to this database on other pages.

I have two problems here,

1) html is accepted in the text area, stored in the database and then processed whenever i call the information, I would like to Ignore html, or for that matter everything except harmeless text :)

2) Keystroke formatting does not work, if the user hits return to go to a new line in the text area, this is not stored in the database, and all formatting is lost when i re-call the info later. However html formatting does work (see point 1).

Does anyone know how id go about doing this please ??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.