PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 9th, 2002, 01:40 PM
casa casa is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 20 casa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to casa
html into a mySQL database

I have a form to input some data into a mySQL table. I would like to allow the user to bold certain statements or words. I notice on most of these bulletin boards that in order to enter any kind of html formatting you enter the appropriate tag surrounded by square brackets ([]) instead sharp brackets (<>). Why is that? I also need, at times to allow users to enter a single quote into the itwCalendar. If they just enter a bare ' without they end with a ' being displayed. Any ideas on how to fix that other than entering a & # 1 3 5 ; in place of the single quote

Reply With Quote
  #2  
Old November 9th, 2002, 01:58 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: html into a mySQL database

the [] brackets are used so that only certain tags can be used. and everything else is stripped from the text with the strip_tags() function. if you allowed any html tag they could completely change your output or load their own page via an iframe and stuff like that. so you simply stip the tags.

the slashes and stuff can be figured out with addslashes() stripslashes() ...
you should look at the string functions in the manual for details.

http://www.php.net/manual/en/ref.strings.php

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > html into a mySQL database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT