PDO Select with multiple Parameters

Completed Posted 4 years ago Paid on delivery
Completed Paid on delivery

Hi, I have a form with 3 fields - after submit the database should be displayed in a table. but I do not get any results as I think the Select is wrong.

Here is what I have:

if (isset($_POST['submit'])) {

$stmnt = $pdo->prepare('SELECT * FROM wccrm_photos WHERE vorname_braut = :first AND vorname_braeutigam = :second and datum = :third ORDER BY action asc');

$stmnt->execute([

'first' => $_POST[vorname_braut],

'second' => $_POST[vorname_braeutigam],

'third'=> $_POST[datum]

]);

// $stmnt->execute(array($_POST[vorname_braut], $_POST[vorname_braeutigam], $_POST[datum]));

$data = $stmnt->fetchAll();

?>

<div class="table-container">

<table>

<tbody>

<tr>

<td>Braut</td>

<td>Bräutigam</td>

<td>Action</td>

</tr>

<?php foreach ($pdo->query($stmnt) as $daten) { ?>

<tr>

<td><input name="vorname_braut" type="text" class="style13" id="vorname_braut" value="<?php echo $daten[vorname_braut]?>" style="width: 50px" readonly></td>

<td><input name="vorname_braeutigam" type="text" class="style13" id="vorname_braeutigam" value="<?php echo $daten[vorname_braeutigam]?>" style="width: 50px" readonly></td>

<td><input name="action" type="text" class="style13" id="action" value="<?php echo $daten[action]?>" style="width: 150px" readonly></td>

</tr>

</tbody>

<?php } ?>

</table>

</div>

<?php

} else {

//here is the form... }

PHP MySQL

Project ID: #20427452

About the project

19 proposals Remote project Active 4 years ago

Awarded to:

iotait

Hello There, I will be able fix your PDO script. Please share your PHP file & Database SQL so I can debug the code and send you back the fixed code within few minutes. I am an experienced PHP Developer with more th More

€10 EUR in 1 day
(90 Reviews)
7.2

19 freelancers are bidding on average €22 for this job

bjrupani

Hello hiring member i hope you are doing well i am bhavik ai have 3+years experience in php , laravel , ajax , jquery , javascript ,, html ,css , bootstrap i have done many thinngs with php i can start it right now and More

€25 EUR in 1 day
(248 Reviews)
8.0
nixtech

Hello Sir, I can fix the issue right away and can ensure data actually get entered and displayed. I am willing to start right away. Please check my profile for work and experience. Regards Ashwin

€30 EUR in 1 day
(392 Reviews)
7.3
shahid864

Hi, My name is Shahid, i am working in web development from past four years. Will provide you quality work and hopefully we will have long term relationship in web development. Let me know if i can help you. let's disc More

€19 EUR in 1 day
(706 Reviews)
7.5
ShrineWeb

Hi, I have done this before but I have a few questions, can we chat please? I have 10 years of experience in PHP.

€20 EUR in 14 days
(132 Reviews)
6.8
purplemaestro

Hello. My name is Muhammad Hassan. I have high level expertise in PDO and PHP and MYSQl as well. I can start right now and wont disappoint you. Please share other details with so that I can start working on it.

€15 EUR in 1 day
(133 Reviews)
6.6
shijudasan

I will resolve the issue for you if u let me.. I am a php developer with more than 8 years exp. developing websites..

€30 EUR in 1 day
(36 Reviews)
6.2
dreammate0621

Hello! I am a web developer. I have checked your project description. I can help you I guarantee the good result. I will wait for your reply. Thank you.

€19 EUR in 7 days
(26 Reviews)
5.6
kovirijagdish

I believe in providing good quality code and services with security. I am a Web Security Researcher, ColdFusion and Php Web Developer & Bug Bounty Hunter at HackerOne, BugCrowd, BountyFactory and many other Independen More

€30 EUR in 1 day
(104 Reviews)
5.3
BestService222

Dear client, how have you been? I've read your project description carefully. I am a excellent Full-Stack Web development expert. I think your project is very suitable for me. I 'm very interested in your project. More

€30 EUR in 1 day
(19 Reviews)
5.4
AshleyTripp786

Hello, Thank you for the offer you submitted. I checked your project details and I understand your demand, I agree with you to do the job. I am a professional PHP and Wordpress Developer. I am here to help you & get More

€30 EUR in 7 days
(18 Reviews)
4.1
csahu66

Hi, I have 5+ Years experience in Web Designing/Development & Graphics Designing with good experience in following skills. 1. HTML/HTML5 2. css/css3 3. JS (Angular JS, Backbone JS, React JS, node.js Express JS, Gulf More

€30 EUR in 7 days
(2 Reviews)
2.1
ProgramICO

Hello I am a senior developer so i can do it very easily if you want. Contact me right now i am ready to start this project for you. Low cost and high quality result reply to discuss more about this project

€19 EUR in 7 days
(2 Reviews)
2.1
meet1511

Hello, im web developer and i have 3 years experience in php and im working on pdo since last 3 years. I can help you in this and i guarantee to solve this issue.

€19 EUR in 1 day
(0 Reviews)
0.0
nikhilhiwrale

hello , i am senior software developer,,I have studied your issue. i would like to help you solving your issue

€10 EUR in 1 day
(0 Reviews)
0.0
nasimahmed1998

hi dear I will you do this work free. If you like, I'll give me 20 euro. You will send me all the details Thank you

€16 EUR in 2 days
(0 Reviews)
0.0
rajrajeshsl

We are happy to resolved this issue. Thanks,

€16 EUR in 1 day
(0 Reviews)
0.0