Hi i tried on this code and found out there is error for that.
<?php require_once(‘../Connections/mConn.php’); ?>
<?php
mysql_select_db($database_mConn, $mConn);
$query_rs2 = “SELECT * FROM example1”;
$rs2 = mysql_query($query_rs2, $mConn) or die(mysql_error());
$row_rs2 = mysql_fetch_assoc($rs2);
$totalRows_rs2 = mysql_num_rows($rs2);
?>
<script type=”text/javascript”>
var menu3=new Array()
menu3[0]='<a href=”user_shopping.php”>e-Shopping</a>’
menu3[1]='<a href=”user_tv.php”>e-TV</a>’
menu3[2]=’$row_rs2[‘name’]’
</script>
Whereby in table example1, the column ‘name’ has the value of
<a href=”user_facilities.php”>e-Facilities</a>
For the javascript, it suppose to have drop down menu when my mouse over it but after i use the menu3[2]=’$row_rs2[‘name’]’the drop down list becomes disabled. The problem should be from the code menu3[2]=’$row_rs2[‘name’]’. Does anyone know how to code it correctly?Thanks.
I do not straight enter menu3[2]='<a href=”user_facilities.php”>e-Facilities</a>’ because i want it to retrieve the data which i inserted from the database.Hope anyone can help me out.Thanks.