Hi anyhank,
wie sieht denn deine showimage.php aus?
Grüße,
BK
wie sieht denn deine showimage.php aus?
Grüße,
BK
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Wie Diel schon sagt, da rein gehört ein Link und nicht die Bilddaten selbst.
Mach zb. sowas wie showimage.php?id=1234 als Link rein,
dazu eine showimage.php die dann wirklich die Daten erst aus der DB holt
und mit passenden header-Befehlen raussendet.
(header: zB. Mimetyp, dass es nicht HTML sondern ein Bild ist.
Damits beim Browser in jedem Fall krorekt angezeigt wird.)
<?php
$id = $_GET['id'];
// do some validation here to ensure id is safe
$link = mysql_connect("localhost", "root", "");
mysql_select_db("salayth");
$sql = "SELECT image FROM student WHERE id=$id";
$result = mysql_query("$sql");
$row = mysql_fetch_assoc($result);
mysql_close($link);
header("Content-type: image/jpeg");
echo $row['image'];
?>
<?php
session_start();
if(isset($_SESSION["emailadr"])) {
?>
<?php
$link = mysql_connect("localhost", "root", "");
mysql_select_db("salayth");
$sql = "SELECT image FROM student WHERE email= '".$_SESSION['emailadr']."' ";
$result = mysql_query("$sql");
$row = mysql_fetch_assoc($result);
mysql_close($link);
header("Content-type: image/jpeg");
echo $row['image'];
?>
<?php
}
?>