It is currently Wed Oct 09, 2024 7:01 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Image retrieval and display issues?
PostPosted: Wed Jul 26, 2023 4:05 am 
Newbie
Newbie

Joined: Tue Apr 04, 2023 12:47 pm
Posts: 1
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' />"; ?>


Top
 Profile  
 
 Post subject: Re: Image retrieval and display issues?
PostPosted: Wed Jul 26, 2023 4:41 am 
Getting Started
Getting Started

Joined: Wed May 26, 2021 3:14 pm
Posts: 52
Hello,

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

_________________
Damon Felix
ModeratorsTeam
Freehostia.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011