473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

writing into CSV from a web page

HI,

I have a few PHP pages. The pages have text boxes of variable sizes. when i enter data into the text boxes the data is written into a csv file. Each text box corresponds to one column in the csv. However the problem i am facing is that if i enter a comma (,) in anything that i write in a textbox then when it is written to a csv it gets converted into two texts that is data before the comma is in one column and data after the comma is in the next column where as it should all be under one column. How can i do this?? Right now i am simply reading the data from textboxes using GET Session variables.

Thanks
Apr 8 '08 #1
1 1191
ronverdonk
4,258 Expert 4TB
Itb really depends on what you have determined to be the field separator character to be. In your cose it appears to be a comma. You can go 2 ways abouit this.

1. choose a different separator character, like a semi-column or a #.
2. enclose all fields within single or double quotes. That way the separator char is within the quoted field and the CSV reader will treat it as 1 field.

Ronald
Apr 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not...
2
by: Troy Lynch | last post by:
I'm looking into writing a Category Hierarchy on a site I've written and am looking for some information about writing this kind of code. Maybe some samples or a book. Any information would be...
7
by: Brian Burgess | last post by:
Hi all, Anyone see anything wrong with the following: *************************************************************** <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit Dim nAcctNbr Dim...
4
by: George Stout | last post by:
First off I do not know alot about writing queries to an Access Database from an ASP page. This is why I need help. I have an Events database for 6 colleges in our metro area. On the homepage I...
6
by: Jeff Thies | last post by:
I've been thinking about writing CSS that's easy to read and adjust at a later date (often by someone else). Here's where I seem to be headed: Breaking the page down into container divs,...
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
17
by: Eric Lindsay | last post by:
Is learning to write CSS a better use of time than finding and using a package that produces complete web pages? I've moved to a new platform (Macintosh), taking with me about 400 personal web...
102
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality...
1
by: Julian32 | last post by:
Hello, I'm trying to keep track of purchases made from my website by having Paypal redirect users to a page on my site after purchase, and writing the information received to an Access Database....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...

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.