473,659 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

slashes

Ok this is a follow up to a very old topic so I thought it qualified a
new topic the original topic is:
http://groups.google.com/group/comp....5dcbf1f15e235f
now I have talked to my resseller (a friend of mine) and he told me he
doesnt have ANY problems with backslahses going wherever any quotes are
and he told me I could possibly use the "str_replac e" function to get
around this problem so I tried that but of course trying to put a
backslash in quotes is either VERY complex or impossible so if you know
how thats great please tell me. But as I say its very odd as he doesnt
have the same problem that I have, and being my resseller surely he's
on the same server as me?

James.

Oct 31 '06 #1
1 1215
James54321 wrote:
Ok this is a follow up to a very old topic so I thought it qualified a
new topic the original topic is:
http://groups.google.com/group/comp....5dcbf1f15e235f
now I have talked to my resseller (a friend of mine) and he told me he
doesnt have ANY problems with backslahses going wherever any quotes are
and he told me I could possibly use the "str_replac e" function to get
around this problem so I tried that but of course trying to put a
backslash in quotes is either VERY complex or impossible so if you know
how thats great please tell me. But as I say its very odd as he doesnt
have the same problem that I have, and being my resseller surely he's
on the same server as me?

James.
Hi,

Backslashes are added for a good reason namely escaping the next character
all great yeah so you need to know where to use them and where not no such
thing as a general solution yeah please use functions like strip_slashes()
and add_slashes() to make the string fit your needs and do not forget to
understand in the first place where the backslahes come from because if you
do not understand the issue chances are that your application is vunarable
to SQL-injection yeah also it is very well possible that your friends
server has another php.ini than you do so his application behaves
differently look for magic_quotes_gp c settings in your php.ini file and
read the part at www.php.net that covers it just type php.ini in the
searchbox and it will take you there.

Next time use a little more punctuation if you make a posting. :-)

Regards,
Erwin Moller
Oct 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4977
by: Randell D. | last post by:
Folks, I'm using Apache/1.3.28 (SuSE 7.1, kernal 2.4) with PHP/4.3.2. I have the following code to help cleanse form data. function cleanData($sourceData, &$cleanData) { foreach($myData as $fieldName=>$fieldValue) { if(strlen($fieldValue)>0) { $cleanData=htmlentities(trim($fieldValue)); } else { $cleanData=""; }
1
2110
by: mr_burns | last post by:
Hi, I have been sending emails using PHP with the mail() command/method. When I send them tho it adds slashes, for example: 'hi guy's' gets sent as 'hi guy\'s' Why is this? How do I sort this? Cheers Burnsy
13
2029
by: lawrence | last post by:
A user writes this sentence: "It was the New Urbanist's nightmare of sprawl run amok." They input that and my PHP script hits it with addslashes() and then the sentence gets put in the database. A slash is likely inserted in front of the quote mark in "Urbanist's". Later the user runs a search of the database for "New Urbanist's nightmare".
16
1544
by: droog | last post by:
Hello! I have just started learning python and encountered a problem. All I wanted to do, was to open a text file search and count the number of occurances of a single word and print that count. Thanks for help.
10
1981
by: Carlos Ribeiro | last post by:
Hello all. I'm sending this to the list because I would like to know if someone else has ever stumbled across this one, and also because one possible solution is to patch, or simply "decorate", some of the Python libraries functions (a few of the os and os.path calls). Note: if you're going to reply, please read it *all* before doing so -- I've already explored this problem quite a bit, and found no obvious solution to it yet.
7
22122
by: Alex | last post by:
I'm new to Oracle, so this question may sound silly. I have been given a list of Oracle tables (they may be views, I'm not sure) that are available to me. I can run simple SQL select statements against most of them in SQL Plus. But some of them have "slashes" in their names such as /XYZ/CUSTOMERS or /XYZ/ADDRESSES . When I try to use the name the way it's listed (with slashes) I get an error. I even tried replacing the slashes with dots,...
5
11404
by: Treetop | last post by:
I have noticed with various codes that the slashes are not consistent. Is there a reason for this. For example </td> </\td> <\/td> <td /> what is the difference with these tags?
4
2177
by: bdwise | last post by:
I have a textbox in a form, and I need to allow users to enter dates in US Format (MM/DD/YYYY). But they do not want to type any slashes, just 8 numbers, and have the slashes added for them. What is the best way to do that? Thanks.
10
2027
by: Julie | last post by:
Why does the faq make this statement regarding slashes in paths: "This is because the library routines on these operating systems handle "/" and "\" interchangeably. " http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.16 This seems like completely the wrong answer for this question. Rather than saying that you should use forward slash as a delimiter, it should say
0
1176
by: Henrik de Jong | last post by:
Hello, I'm using radeditor. When I set the html-property to the text wich has to be altered, it gives me an error when try to save the new values of the html-proterty. It occurs only when i'm using slashes (\) When i'm using 2 slashes (\\) it goes well. But when i load the page again to alter the text itself the two slashes are changed to one slash. The exception that raises is System.Data.DBConcurrencyException
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.