value row in php dropdown
$10-30 USD
Płatność przy odbiorze
I need my dropdown remeber the last selected when i go back to editpage
<?php
//Connect to our MySQL database using the PDO extension.
$pdo = new PDO('mysql:host=localhost;dbname=test', 'root', '******');
//Our select statement. This will retrieve the data that we want.
$sql = "SELECT id, username FROM users";
//Prepare the select statement.
$stmt = $pdo->prepare($sql);
//Execute the statement.
$stmt->execute();
//Retrieve the rows using fetchAll.
$users = $stmt->fetchAll();
?>
<label for="title">Team:</label>
<select id="title" name="username" style=" width: 100%; padding: 7px; margin: 8px 0; box-sizing: border-box; >
<?php foreach($users as $user): ?>
<option value="<?= $user['username']; ?>"><?= $user['username']; ?></option>
<?php endforeach; ?>
</select>
Numer ID Projektu: #25433417
O projekcie
Przyznany użytkownikowi:
Hi there, I am an expert at the PHP & surely can help you on this, Also available to start on work right away let me know if you can send me the code or FTP thanks.
10 freelancerów złożyło ofertę za $22 w tym projekcie
Hello There, I am having huge experience in PHP. I will fix your issue. I can start right away and complete it in next 1-2 hours. Looking forward for quick and positive reply. Thanks Rohan Vyas
Hi During the addition time you can save its value and then edit you retreive the value / compare with condition. i am placing my quote for this job. regards saju
Hi, I am a PHP developer. I can make changes and fix issues in your PHP script. I can get the script to display the selected value when you visit the page again.
Hey. I want to do this project. Some of my skills are: PHP, MySQl, jQuery / Prototype, Javascript, HTML, CSS. Can start right away.
Hi. It is easy. Please use SESSION. I hope my proposal will be helpful for you. Regards, Fabian.
Hi, I can create php that remember the last selection of drop down in above code. Let do it now Thanks.