I want to display the content of a file which is stored in a database. I put a read button next to each column and if you click on this button you should be able to read the content of the stored file on a new page.
Here’s the code.
<?php if (isset($_POST['Read'])) { mysql_connect("localhost","root","") or die ("Connection failed"); mysql_select_db("txt_archive") or die ("Connection failed"); $sql2=("SELECT location FROM files") or die ("Fájl nem található."); $myData = mysql_query ($sql2,$con); $content = file_get_contents($sql2); print ($content); }; ?>