FreeHostia Forums

Image retrieval and display issues?
Page 1 of 1

Author:  TomanyD63 [ Wed Jul 26, 2023 4:05 am ]
Post subject:  Image retrieval and display issues?

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' />"; ?>

Author:  bsavov [ Wed Jul 26, 2023 4:41 am ]
Post subject:  Re: Image retrieval and display issues?


The error could be due to your database connection with the script and if you have a hosting account with us, please open a ticket via the Help Center for further assistance from our Technical Support Department.

Best Regards

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group