fetch multiple images rows from mysql by UserID -- 2

Completed Posted 3 years ago Paid on delivery
Completed Paid on delivery

i need some one fix for me this code

this my code but given me all images for all users like UserID 1 And UserID 2 i need fetch every user has his own images only user this my Current code.

<?php

$stmt = $DB_con->prepare(

'SELECT ID, UserID, docType, docDescription, uploadDate, docFile FROM tbldocument ORDER BY ID DESC'

);

$stmt->execute();

if ($stmt->rowCount() > 0) {

while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {

extract($row); ?>

<div class="col-md-3">

<div class="panel panel-default">

<div class="panel-body">

<figure>

<img src="userdocs/<?php echo $row['docFile']; ?>" alt="">

<figcaption class="language ltr"><h3><?php echo $docType; ?></h3><sub><?php

echo $docDescription;

if ($row['docDescription'] == "") {

echo "None Description.";

}

?></sub><sub><?php echo date(

'd-m-Y g:i A',

strtotime($row['uploadDate'])

); ?></sub></figcaption>

</figure>

</div>

<p class="page-header">

<span><br>

<a class="btn btn-info" href="[login to view URL]<?php echo $row[

'ID'

]; ?>" title="click for edit"><span class="glyphicon glyphicon-edit"></span> Edit</a>

<a class="btn btn-danger" href="?delete_id=<?php echo $row[

'ID'

]; ?>" title="click for delete" onclick="return confirm('Are sure want to be deleted')"><span class="glyphicon glyphicon-remove-circle"></span> Delete</a>

<input type="text" name="User_ID" value="<?php echo $uid; ?>"/>

</span>

</p>

</div>

</div>

<?php

PHP MySQL JavaScript Software Architecture HTML

Project ID: #29916707

About the project

8 proposals Remote project Active 3 years ago

Awarded to:

Brijrajs76

Ready to Start Work Now I am a Professional Freelancer with experience of more than 7+ years with specializing in Web-Development & Designing (Node,Laravel,C.i,Lemda,ICO,Blockchain,Multichain,Wordpress ,Woocommerce, eC More

$10 USD in 7 days
(105 Reviews)
6.2

8 freelancers are bidding on average $20 for this job

eaglehorn

Hi there, I can fixed it for you. I'm available today to fix your code to fetch images by userID. Thanks.

$25 USD in 1 day
(66 Reviews)
5.0
Lutfurccn

Change your MySQL code for get all images using specific user id. I hope you will allow me to do this simple task. Start right now. Thanks Lutfur

$10 USD in 1 day
(42 Reviews)
4.6
fascompaq

Hello Thanks for posting the project. I see what you are facing, you are not putting the user id in the filter query to ask for only one user. Can you please show the page where you are doing this. please open communic More

$30 USD in 1 day
(5 Reviews)
1.4
Prgohil89

✔️ Immediate Start ✔️ php Experienced ✔️ Surely Complete in some hours I have seen your given description and we are ready to start immediately your project ? Previous work available on request. I would be glad to b More

$25 USD in 7 days
(1 Review)
1.0
lhada123

Hi, I read your project, and your code, contact me right now, I can help you on your problem, I'm free.

$20 USD in 1 day
(0 Reviews)
0.0
vkpandit1909

I've read the job description thoroughly and I understand your problem. I can solve your problems in a couple of hours. I just have to see your database and I'll make query as per your requirement. I'm expertise at dat More

$10 USD in 1 day
(0 Reviews)
0.0