...

View Full Version : Passing Variables In a Hyperlink or Alt or Title ect.



connormcwood
07-25-2012, 12:32 PM
I've seen a few threads pop up in the support area of the php Section about
parcsing Variables In a Hyperlink, Alt, or Title. I am going to give you all a working code snippet which is used within my game I am Currently Making.


$table = "SELECT * FROM users";
$test = mysql_query($table);

echo "<table><tr><th>Username</th>";
echo "<th> </th>";
echo "<th>Created</th>";
echo "<th>Infastructure</th>";
echo "<th>Statename</th>";
echo "<th>Money</th></tr>";
while ($row = mysql_fetch_array($test)) {
echo '<tr><td><a href="profile.php?user='
. $row['username'] . '">'
. $row['username'] . '</a></td><td>
<a href="sendmessage.php?user='
. $row['username'] . '"><img src="images/messageicon.png" alt='
. $row['username'] . '</img></a></td><td>'

. $row['dayregistered'] . '</a></td><td>'
. $row['infrastructure'] . '</td><td> '
. $row['statename'] . '</td><td> $'
. $row['money'] . '</td></tr>';

}
echo "</table>";



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum