•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 427,778 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,778 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1510 | Replies: 3
![]() |
| |
•
•
Join Date: Jul 2004
Location: North East Indiana
Posts: 491
Reputation:
Rep Power: 5
Solved Threads: 20
Ok, here's a hint: CSV files are normally just plain text. You have to read the information in before you can do anything with it.
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
•
•
Join Date: Sep 2006
Location: Michigan
Posts: 22
Reputation:
Rep Power: 3
Solved Threads: 0
Simple PHP Pagination - No Database Required.
If you like it, give me some props. ;)
If you like it, give me some props. ;)
•
•
Join Date: Dec 2006
Posts: 34
Reputation:
Rep Power: 2
Solved Threads: 0
Hi
thanks for the reply. But i hv already done what you hv sent me....
my csv contains firstname,lastname,email id. So i have to validate the
email and not allow specialchar other than @. The following is my code.....
if($_REQUEST['submit'])
{
$errmsg="";
$contents = file ('./email_entries.csv');
for($i=0; $i<sizeof($contents); $i++)
{
$line = trim($contents[$i],'",$#!%&^*()');
$arr = explode(',', $line);
if(!$arr)
{
$errmsg.='Invalid CSV file! Please check again.';
}
else{
$sql = mysql_query("insert into employees(first_name,last_name,email_id) values ('".$arr[0]."','".$arr[1]."','".$arr[2]."')");
}
}
}
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Websites content extraction team (Post your Resume)
- read second line or record of csv file (PHP)
- problem opening CSV file (C++)
- insert csv file into mysql through php (PHP)
- coldfusion administrator error (ColdFusion)
- Save a text file in an csv.file with ascii? (PHP)
Other Threads in the PHP Forum
- Previous Thread: Has anyone used this....
- Next Thread: How to delete using checkboxes


Hybrid Mode