I m trying to pass the email fetched from database to next page based on the row button clicked. But i m not able to use inside the value attribute of tag.
i have created a button for each row. for any button clicked i want to move to a common page with row email. the email varies based on selected button.
while($row= mysqli_fetch_assoc($results))
{
$_email=$row["email"];
echo "<tr><td>". $row["email"] ."</td><td>" . $row["name"] .
"</td><td>". $row["credit"] ."</td><td>".
'<form method="post" action="user.php">
<input type="hidden" name="data" value="<?php echo $_email?>"/>
<button><b>Home<b></button>
</form>'. "</td></tr>";
}
the email corresponding to the row button should be avialable in user.php file using $_POST method. i m not getting email value when i m doing $data=$_POST["data"] in the user.php page