apple2
Wed 10 October 2007, 06:15 am GMT +0200
What is the basic sequence of encoding for the database? Is this correct?
User submits form input
On the server:
PHP sends form input to BBcode parser which replaces all <> with > and <
The BBcode parser then replaces all BBcode tags [] with corresponding html <> tags and stores that in the database.
To send display code to the client you just send the post contents straight from the database.
To display the code in a form you must send it to the bbcode unparser so it switches its known html tags back to bbcode.
On top of that some editors allow you to edit the bbcode but in a rendered view.
How is html being rendered in the form input area?
Should my PHP code be replacing /n from the form input with <br> or is that the parsers job?
Thanks!!!!
User submits form input
On the server:
PHP sends form input to BBcode parser which replaces all <> with > and <
The BBcode parser then replaces all BBcode tags [] with corresponding html <> tags and stores that in the database.
To send display code to the client you just send the post contents straight from the database.
To display the code in a form you must send it to the bbcode unparser so it switches its known html tags back to bbcode.
On top of that some editors allow you to edit the bbcode but in a rendered view.
How is html being rendered in the form input area?
Should my PHP code be replacing /n from the form input with <br> or is that the parsers job?
Thanks!!!!