SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict madproject.com's Avatar
    Join Date
    Jan 2003
    Location
    Ottawa, Canada
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inputing html tags in variable stored on MySQL

    I designed a form that allows users to add an advertisement. I want to allow them the most flexibility in the way they want their ad displayed.

    Could any html code they input in the form that is stored in a variable then shipped off the the database cause errors?

    What should I look out for? What technics are good to use in these cases?

    I guess I want to allow <b></b><img /><a href></a> and that's about it. Since most advertisement will be in the form of flyers(images)

    Thanks
    Free Picture and Video Hosting
    [http://photocabin.com][http://madproject.com]

  2. #2
    if($awake){code();} PHP John's Avatar
    Join Date
    Jul 2002
    Location
    Along the Wasatch Fault line.
    Posts
    1,771
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at the strip_tags() function in PHP. That may be what you are looking for.
    John


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
  •