SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    templates and mysql

    Hello
    I want to create a template driven site. However I want to put the templates in my database. I know that the html code with the php variables are in the template. I inserted the code through a form into a templates table. I have 2 fields name and content.
    The thing is when I check the table in the database in the content field I can't see any html tags it only comes up with one word of Text.
    and when I call the template from a php page all I get is a blank screen. Can anyone show me how to upload templates into my database as I'm obviously doing it wrong as nothing is displayed.
    thanks for any help
    Guy

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's many possible error sources:

    Watch out for quotes (double, single quotes)

    Check whether you used addslashes / stripslashes

    Most importantly though, check for semicolons:
    What happens with these?

    Watch out for reserved SQL-words (check the manual for those).

    What type of field is it you're using? TEXT, VARCHAR... ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •