Seeking help with retrieving and displaying images from a database. Facing issues with broken image icons while attempting to select random images. Need assistance in identifying the problem and finding a solution.
<?php require_once 'login.php'; $db_server = mysql_connect($db_hostname, $db_username, $db_password); if (!$db_server) die("Unable to connect: " . mysql_error()); mysql_select_db($db_database) or die("unable to select database: " . mysql_error()); $query = "SELECT image
owespeedtest FROM names ORDER BY RAND()"; $result = mysql_query($query) or die('Error, query failed'); header ("content-type: image/jpeg"); $name = $_FILES['filename']['name']; move_uploaded_file($_FILES['filename']['tmp_name'], $name); echo "Uploaded image '$name'<br /><img src='$name' />"; ?>