![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
Really Quick PHP Help REQ
I need to trim special characters out of a form because it's parsing the "'" (single quote) and fucking up a cart I'm building. Users that have something like "Joe's Mags" crashes the cart due to the single quote. Here's what I have:
PHP Code:
PHP Code:
__________________
no sig |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 6,103
|
Why not addslashes?
__________________
--- |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking Banned
Join Date: May 2006
Posts: 2,187
|
And btw, don't start the regexp engine if you don't REALLY need it. it's a hog.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,229
|
I'm in awe that you know how to write regex like that but didn't know about addslashes :P
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Feb 2005
Location: SD/OC/LA
Posts: 1,917
|
or ... mysql_real_escape_string
ugh.
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ![]() ![]() =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
So Fucking Banned
Join Date: May 2006
Posts: 2,187
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Don't forget, mysql_real_escape_string() requires a handler, so you must have an open DB socket to use it.
For the love of god, people, learn to sanitize your variables.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |