I am having a problem retreiving a variable that has been url-encoded from a previous php href link. I have a script that passes a variable, but is it doen right? And, how do I get the variable in the new page? The code is as follows for the passing:
$passproj = urlencode($row['file']);
echo '<table width="100%" border="2" cellspacing="2" cellpadding="2" bgcolor="#84BBD9" bordercolor="#400000">';
echo '<tr>';
echo '<td width="20%">' . $row['UserID'] . ' </td>';
echo '<td width="20%">' . $row['file'] . ' <a href="project_contrib.php?$passproj" target="_self"><input type="button" value="View"></a></td>';
echo '<td width="20%">' . $row['OrigProj'] . ' </td>';
echo '<td width="20%">' . $row['OrigUser'] . ' </td>';
echo '<td width="20%">' . $row['ProjDate'] . ' </td>';
echo '</table>' ;
This ends up having a 'View' button added at the end of my file name in my table, and you click on the button and it takes you to that php page with the url encoded variable attached to the url.
The URL ends up looking like this:
http://www.mysite.com/project_contrib.php?$passproj
Is this correct to send and if not, what is the way to do it, but if correct, how do I retreive it in the next php script?
help!
Ice