hiii i just want to get value of text field from one php page to another page by clicking on that value of text field of first page which is linked to each other ,after clicking on the value of text field of first page that value should be automatically set in the text field of next page, i have use following code for that
$haspid= $row["haspid"];
if (strlen(trim($haspid)) == 0)
{
echo "<td> </td>";
}
else
{
echo "<td valign='bottom'><a href='window.history.back();' Name=" . $uName . " && haspid=" . $haspid . ">" . $haspid . "</p></td>";
}
echo "</tr>";
Add the value you want to pass to the url that the visitor is clicking on ...
<a href="theotherpage.php?value=XYZ">XYZ</a>
Page 1 Code:(where user input the data)
<form method="post" action="submit.php">
<input type="text" name="customerName" />
<input type="submit" />
</form>
Page 2 Code:(where you want to get the data)
<?php
echo $_POST['customerName'];
?>
Explanation:
$_POST
is the php's global
variable. When <form>
in HTML
submitted with method=post
we can get the value like $_POST[input_field_name]
. So, after getting the value with $_POST[input_field_name]
you can use it in your desired way.
Hope it helps you.