/ Published in: PHP

This piece of code will store each line of a txt file into a mysql database
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $query = 'insert into titulos (nome) values ("%s");'; mysql_query(sprintf($query, mysql_real_escape_string($lines[$i]))) or die(mysql_error() . '<br><br>' . '<b>Query:</b> ' . $query); } ?>
Comments
