tpfp Posted September 25, 2006 Share Posted September 25, 2006 is there a way to pasting a table in html code into a field on a form then submit it to a database and display the entry as a table.etc if i paste this into a field called info.<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%"> <tr> <td width="33%">name</td> <td width="33%">surname</td> <td width="34%">age</td> </tr> <tr> <td width="33%">billy</td> <td width="33%">gates</td> <td width="34%">54</td> </tr></table>how would i then display it as a table instead of the code.this is how i currently display and convert text $info = nl2br(stripslashes($row['info']));sorry for the poor description of what i need to do Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 25, 2006 Share Posted September 25, 2006 yes - just post it directly into a query - use addslashes if magic quotes are off!!! Quote Link to comment Share on other sites More sharing options...
tpfp Posted September 25, 2006 Author Share Posted September 25, 2006 Yeah i tried that but what happens is the table drops down for some reason half way down where its supposed to be.is this a formatting problem ?.[img]http://i51.photobucket.com/albums/f398/gilesp70/spare/table.jpg[/img] Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 25, 2006 Share Posted September 25, 2006 this looks more like poorly formed html - have a look at your source and see if there is an unclosed tag or something like... if the html you posted into the database is echoing out correctly then it is something to do with the parent elementsIt could also be your styles if you have any... Quote Link to comment Share on other sites More sharing options...
tpfp Posted September 25, 2006 Author Share Posted September 25, 2006 Ok thanks toon I will try what you have mentioned Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.