i have this quick issue please.
I have this code here which permits me to extract a user name and a photo, and when the name is clicked it takes me to this hostess.php file, well, i need to pass the id variable to the hostess.php and save it, in order to get information only for that id..
Here is the code:
while ($row = mysql_fetch_array($query)) {
echo "<div id='photo'>";
echo "<div id='picture'>";
echo "<td> <img src=foto/photo1/".$row['photo'] . "></td>";
echo "</div>";
echo "<div id='text'>";
echo '<td><a href="hostess.php">'. $row['first_name_en']." ". $row['family_name_en']."</a></td>";
echo "</div>";
echo "</div>";
}
How can i just get the id and then how can i save it to the $id variable
Thanks
The table structure is like this:
The table name is called hostess and the field i need to retrieve from hostess is the [id]
Change the line:
to this:
and in
hostess.php, use this to extract the value:EDIT
Here is another method to pass variable as
POST. Again, change the aforementioned line to:You can use
CSSto style that button as simple text too. And the value can be retrieved inhostess.phpas follows: