Jump to content

Help!!!!!!


phpfisher

Recommended Posts

ive been programmed a php script for a long time, and im stuck, its for movie clips

[code]while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into a table
$playphp = "<a href=".""play.php?"".$row['id'].">";
echo $playphp;
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo $row['creator'];
echo "</td><td>"; 
echo $row['date'];
echo "</td></tr>";
echo "</a>";
}
[/code]

bascially i want to link each row of the table to play.php?{its id}

but it messes up when i use double quotes[code]""play.php?""[/code] can anyone help
Link to comment
https://forums.phpfreaks.com/topic/28806-help/
Share on other sites

You can do what the guy above said, or try using ' instead.

while($row = mysql_fetch_array($result))
{
$playphp = "<a href='play.php?$row[id]'>";
/* other methods*/
// $playphp = "<a href='play.php?".$row[id]."'>";
// $playphp = "<a href=\"play.php?".$row['id']."\">";
            // Most servers dont require ". . " etc;
echo $playphp;
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo $row['creator'];
echo "</td><td>"; 
echo $row['date'];
echo "</td></tr>";
echo "</a>";
}
Link to comment
https://forums.phpfreaks.com/topic/28806-help/#findComment-131889
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.