Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head><title></title></head>
- <body>
- <form enctype="multipart/form-data" action="load.php" method="post">
- <input type="file" name="upload" />
- <input type="submit" name="submit" value="Enter" />
- <?php
- mysql_connect("localhost", "root", "") or die("Unable to Connect". mysql_error());
- mysql_select_db("DBCSE");
- $file = $_FILES["upload"]["name"];
- echo "<br />", $file, "\n";
- $sql = "LOAD DATA LOCAL INFILE '$file' INTO TABLE tblStudent FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY
- '\r\n' IGNORE 1 LINES
- (id, name, gender)";
- mysql_query($sql);
- ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement