<?php if (isset($_GET['p'])){ $temp_date=$_GET['p']; echo "DATE : $temp_d <br>"; $connect=mysql_connect("localhost","user","pass") or die ("Check your server connection"); $db_found = mysql_select_db("mydb", $connect); $SQL = "SELECT * FROM mytable WHERE date =$temp_d"; $result = mysql_query($SQL); $row=mysql_fetch_array($result); echo "Details: $row[details]<br>"; $content = $row['image']; header('Content-type:image/jpg'); echo $content; } ?>its not working.in firefox its shows the name of the script+parameter and in IE opens a download box
If i try
<?php $connect=mysql_connect("localhost","user","pass") or die ("Check your server connection"); $db_found = mysql_select_db("mydb", $connect); $SQL = "SELECT * FROM mytable WHERE id=1"; $result = mysql_query($SQL); $row=mysql_fetch_array($result); $content = $row['image']; header('Content-type:image/jpg'); } ?>its shows my stored image.how to pass the parameter and show the results to ? i dont know how thats possible but if i dont put
echo $content; i got my data (from other echoes) .how to have both image echo and details echo ?? tnx in advance