Log in

View Full Version : html to vbcode?


mfacer
12-12-2003, 01:35 PM
I have got a custom field where the user can enter vbcode.. I then use the parsevbcode2 (or something like that) to turn it in to HTML and save to the DB.... but when I get the value back from the DB, it is being read in as HTML.. not Vbcode........

how do I get the HTML from the DB to turn back in to the vbcode? ie: which function is it in the functions.php file!? I cant find it anywhere!!

thanks,

Matt.

Velocd
12-12-2003, 03:53 PM
You're going in reverse order.

Don't put parsed vBcode into the database. Just insert the vBcode directly in the database.

Then, in your query processes, after getting the field with the vBcode, use the parsevbcode function to translate it into valid HTML.

mfacer
12-12-2003, 05:20 PM
aaaah right.... so in the DB store the Vb code... then the page is changed!! :) bingo!! makes sense!!! LOL!! thanks!