I've created a file that displays info from DB (pid, name, email), in that file there is a link to another file to edit the selected field:
showall.php
<?php
...
print "<td align='center' width=\"20%\" align=left><a href='display.php?pid=$pid'>$pid</td>";
...
?>
If I view the source page it shows something like this:
<td align='center' width="20%" align=left><a href='display.php?pid=1'>1</td>
In display.php am trying to edit the info for a specific field using its id(pid), everything seems to be fine when I do the edit and commit the changes, but in the DB nothing change.
This is the first line in display.php:
$pid = $_REQUEST['pid'];
I echoed the pid to see what value it has:
echo "This is the PID".$pid;
But it prints name and NOT pid, even though it displays the right data that is associated with this pid.
I added this line to display.php:
print_r( $_REQUEST );
It displays this result:
Array ( [pid] => 9 )
but when I assign the value
$pid = $_REQUEST['pid'];
and echo the result
echo $pid;
it shows the name and NOT the id
Could you please help me find what makes it behave this way?
Thanks,