I need help integrating javascript into a php file. I am trying to use onclick function to have to user go to another page once they select a radio button
I have never used javascript before so I need details on using the onclick function as it deal with my example.
code below
<html>
<head>
<script language=”JavaScript”>
</script>
</head>
<body>
<?php
$connection = @mysql_connect(“localhost”, “administrator”, “bulls23”)or die(mysql_error());
$result= @mysql_list_dbs($connection) or die(mysql_error());
echo “<b>select a Database</b><br >
while($row = mysql_fetch_array($result)) {
// echo “<input type=’radio’ name=’dbnames’ value=’$row[Database]’>$row[Database] <br>”;
echo ‘<input type=”radio” name=”dbnames” value=”‘ . $row[Database] . ‘” onclick=”window.location=info.htm?db=’ . $row[Database] . ‘”>’ . $row[Database] . ‘<br>’;
}
mysql_close($connection);
?>
</body>
</html>