![]() |
how to insert html or php code into a table?
im trying to insert some html or some php code into a databasese table but im getting errors. how do i do this?
i'm trying to insert this Code:
<li>NaviDoor School Application Service (Excluding Mandatory School Application Fee 'Application Requirement')</li> |
And what errors are you getting? Perhaps you want to escape your single quotes before sending that to the database first?
|
yea i think it has to do with symbols but if i did use the htmlspecialchars function to insert the data how would i convert it back to html to preview it.
|
Run the HTML string through mysql_real_escape_string() to prevent the HTML causing problems with the SQL query syntax (and for a basic, much needed security boost) if you're not already.
Do not transform the data (i.e. using htmlspecialchars, etc.) where it's not necessary. That's a basic rule of thumb and an important one to learn. |
why didnt i think of that salathe :D thanks
|
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
|
In order for me to debug that message, I need to see your query.
|
here is the code
Code:
<?phphere is the content that went into the text boxes Code:
title: Promo Package |
| All times are GMT. The time now is 03:52 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0