PHP: passing a variable through a link

user3160031
echo '<td><a href="pagetwo.php?id="' . $row['id'] . '">' . $row['name'] . "</a></td>";

I need to send the $row['id'] to pagetwo.php

it pretty much has to be this way (as far as i know) as page one is a list of links... basicly... page two being where I actualy work with the data however the data on page two is called for by the same id found in $row['id']

Simone Nigro

page1.php

<?php
    echo '<a href="page2.php?id='.$row['id'].'">'.$row['name'].'</a>';
?>

page2.php

<?php
    echo $_GET['id'];
?>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related