<form action="update.php" method="post">
<input type="text" name="userdate" value="<?= $b ?>" />
<input type="submit" name="subjoin" value="Update">
</form>
and update.php
$c= $_POST["$b"];
echo "value".$c; //its not working
<form action="update.php" method="post">
<input type="text" name="userdate" value="<?= $b ?>" />
<input type="submit" name="subjoin" value="Update">
</form>
and update.php
$c= $_POST["$b"];
echo "value".$c; //its not working
<?php
$b="my value!";
?>
<form action="update.php" method="post">
<input type="text" name="userdate" value="<?php echo $b ?>" />
<input type="submit" name="subjoin" value="Update">
</form>
and update.php
if(!empty($_POST["userdate"]))
{
$c= $_POST["userdate"];
echo "value".$c; //its not working
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.