In my database i have created a table named iso(2 columns- name of ISO certificate and the code) and by the code below, I am trying to print the names of all the certificates as submit type buttons(clickable). But I am not able to pass that which button was passed to the next file. Please help. Thanks!
<?php
$con=mysqli_connect("localhost","root","","dyna");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM iso");
?>
<form method="post" action="http://localhost/junk.php/">
<?php while($row = mysqli_fetch_array($result))
{ ?>
<input type="submit" name="<?php $row['Code'] ?>" class="login login-submit" value="<?php echo $row['Value'] ?>" >
<?php } ?>
<?php mysqli_close($con); ?>
</form>