Hello guys,
What I want to do is I want to read out a csv file and then but te conent ot the file in a msql datbase .
So far it works but the problem I haven that if I want to let te script to the typing for me so that I dont have to fill in the Values of the MySQL query myself It doesn't work
This is my code so far :
<?php
$dbhost = 'localhost';
$dbuser = 'y';
$dbpass = 'x';
$dbname = 'test';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die;
mysql_select_db($dbname);
$file = fopen("test.csv", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo fgets($file). "<br />";
}
fclose($file);
mysql_query("INSERT INTO test
(Naam,Geboortedatum, Leeftijd,woonplaats, Geslacht) VALUES('$file','$file', '$file','$file','$file' ) ")
or die(mysql_error());
if (!mysql_query($sql,$conn))
{
die('Error: ' . mysql_error());
echo "Gegevens toegevoegd";
}
mysql_close($conn)
?>
I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bunch of new images thanks to a new camera, but in using Picasa to bulk export smaller images sizes,
PHP/PKI
I am trying to set up a web application that uses pki. does anyone have a good tutorial to set this up? I have a "dedicated server" to do all this on
Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,
Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacingAt present my file looks like this 3 Caxxxan Maxxxet Waxxxxe Axxxxxxy Co.Kildare but after the double spacing, I
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
Greek characters in php
Hi,I'm making a script and I m using for first time greek characters.I started to write a simple drop down menu that loads some city names from the database. The names are in Greek in the database and
simple ping code
been searchin the site/web and found code thats simple but doesnt work.I have a personal web server running with various things and a place to upload or down load files from out side my lan.I am
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My index,html file had to be renamed to index.php because i am using a include function, I got told that if
quotes changing
hi allin my contentopening quotes " changes to “close quotes " changes to �what should i use.example :Code: sams’s “whip lashâ€
Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line 21Heres the code:Code: <body