Hai,
I have a problem i have a table with entry's out of a sql database set with php statements.
Now the idea was that when somebody clickt on a entry in the table there comes a popup with the specificated information of the clicked entry but when is was ready and clicked on a entry there's no popup!
Hope somebody can help me here's my code (i have made him shorter the he is in real )
Hope somebody can help me
<?php require_once('Connections/localhost.php'); ?>
<?php
mysql_select_db($database_localhost, $localhost);
$query_Recordset1 = "SELECT * FROM dvd";
$Recordset1 = mysql_query($query_Recordset1, $localhost) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function popup(pagina) {
var popup = window.open(pagina, '', 'scrollbars=yes,height=400,width=400,resizable=yes,location=yes left=0 hight=0');
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?php
// resultaat
$result = mysql_query ('SELECT Id, Titel FROM dvd ORDER BY Titel ASC');
// i aanmaken
$i = 0;
echo '<table width="100%">';
// loopen
while ($row = mysql_fetch_assoc ($result))
{
// de kleur
$bg_color = ($i % 2) ? '#FFF' : '#CCC';
// i update
$i++;
echo '<tr><td style="background-color: ' . $bg_color . ';">' . $row['Id'] . '</td>';
echo '<td style="background-color: ' . $bg_color . ';" align="center"><a href="javascript: popup(dvd_detail.php?recordID=' . $row['Id'] . ')">' . $row['Titel'] . ' </td></tr></a>';
}
echo '</table>';
?>
</p>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
I have a problem i have a table with entry's out of a sql database set with php statements.
Now the idea was that when somebody clickt on a entry in the table there comes a popup with the specificated information of the clicked entry but when is was ready and clicked on a entry there's no popup!
Hope somebody can help me here's my code (i have made him shorter the he is in real )
Hope somebody can help me
<?php require_once('Connections/localhost.php'); ?>
<?php
mysql_select_db($database_localhost, $localhost);
$query_Recordset1 = "SELECT * FROM dvd";
$Recordset1 = mysql_query($query_Recordset1, $localhost) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function popup(pagina) {
var popup = window.open(pagina, '', 'scrollbars=yes,height=400,width=400,resizable=yes,location=yes left=0 hight=0');
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<?php
// resultaat
$result = mysql_query ('SELECT Id, Titel FROM dvd ORDER BY Titel ASC');
// i aanmaken
$i = 0;
echo '<table width="100%">';
// loopen
while ($row = mysql_fetch_assoc ($result))
{
// de kleur
$bg_color = ($i % 2) ? '#FFF' : '#CCC';
// i update
$i++;
echo '<tr><td style="background-color: ' . $bg_color . ';">' . $row['Id'] . '</td>';
echo '<td style="background-color: ' . $bg_color . ';" align="center"><a href="javascript: popup(dvd_detail.php?recordID=' . $row['Id'] . ')">' . $row['Titel'] . ' </td></tr></a>';
}
echo '</table>';
?>
</p>
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>