Hi everyone,
i m a bit new with PHP and i was wondering why what i am doing does not work. I m trying to click on a specific link in a table whose ID is a number taken from my database table and redirect this same ID to the new page that the linker shows to
The code i have written to do this on click is the following but does not work.I dont see the actual ID no. on the browser.I only see SID=$SID whereas i should be getting SID=2
$query="SELECT SID,title,firstname,surname,date_created FROM personal_details";
$result=mysql_query($query);
//display the table headings for each column
echo'<table border=1>';
echo'<tr><td>SID</td><td>Title</td><td>FirstName</td><td>Surname</td><td>Date_Created</td></tr>';
//fetch all the fields specified in $query from the actual tables +all the rows(records) that exist in this table
while($row=mysql_fetch_array($result)){//the same as mysql_fetch_row but i can use $row[fieldname] now instead of numbers
$SID=$row["SID"];
//prints all the actual records inside table row by row in one row
printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
$row["SID"],$row["title"],$row["firstname"],$row["surname"],$row["date_created"]);
echo'<td><a href=\"navigation.php?SID=$SID\">Process application</a></td>';
}//end while
Any suggestions anyone????
If i put hte number manually the next page does grab the number because i have a WHERE clause that manages that.But the problem is that i need it to be passed automatically.!!