Page 1 of 1

help on links

Posted: Tue Sep 26, 2006 11:13 pm
by pleigh
hi, something is messing with my code

Code: Select all

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
		//$sid = $_GET['studentid'];
		echo '<tr><td align="left"><a href="info.php?sid={$row[0]}" class="under">' . stripslashes($row[1]) . '</td>
			  <td align="left">' . $row[2] . '</td></tr>';
	}
the above code should show the records and the name should be a link and when it is clicked, i can view the content...unfortunately, when i move my mouse over a link, the status shows the location of the link to "info.php?sid={$row[0]}" instead of showing the studentid in $row[0]...pls help..

Re: help on links

Posted: Tue Sep 26, 2006 11:17 pm
by shneoh
Change to this:

Code: Select all

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
		//$sid = $_GET['studentid'];
		echo '<tr><td align="left"><a href="info.php?sid='.$row[0].'" class="under">' . stripslashes($row[1]) . '</td>
			  <td align="left">' . $row[2] . '</td></tr>';
	}

Posted: Tue Sep 26, 2006 11:24 pm
by pleigh
perfect dude...thanks.:)