PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 12th, 2004, 12:04 PM
poorapagal poorapagal is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 poorapagal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What to do as ' becomes /' in php

hi all, i run a gaming site but when i enter a review on the site it doesn't keep its BREAKS and spaces but becomes a big blog.. and also the it's becomes it////'s as many times i edit it. Should i define the cell to be some thing else , meaning in the DB should i define it as BLOG or something. As i remember my other site had the same prob that was fixed somehow by a mini code ... how can i get that fixed..

Reply With Quote
  #2  
Old July 12th, 2004, 01:07 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You're adding slashes on the way into the database without stripping slashes on the way out. Check out php.net for addslashes() and stripslashes() function references. Also look up nl2br() for the line break issue. You don't need to define your field as a BLOB. The text type should suffice.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #3  
Old July 13th, 2004, 01:03 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Although this is a bit OT, I thought I'd mention it here since we were on the subject a bit -

For those that may not know, BLOB and TEXT types in MySql are in the same category.

TEXT and BLOB only differ in the way they are sorted. The 4 BLOB types : TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB have the same length restrictions as the 4 TEXT types : TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT.

TEXT types are sorted and compared based on the character set (collation) of the column.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > What to do as ' becomes /' in php


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 3 hosted by Hostway
Stay green...Green IT