when php document is alaunched within the localhost all the data in the database is present how ever
when the php coding is entered into the html file via dreamweaver no data is present which i think connection to the mysql database cannot be establish
why is this can someone help me please, the php document is attached with all the coding
Code: Select all
<?php
$conn=mysql_connect("127.0.0.1","root","") or die(mysql_error());
mysql_select_db("data");
$sql = "select * from `city`";
$result=mysql_query($sql);
?>
<form id="form1" name="form1" method="post" action="">
<select name="user" id="user">
<option value="0" selected="selected">Select</option>
<?php while($rows=mysql_fetch_assoc($result)){?>
<option value="<?php echo $rows['london']; ?>"><?php echo $rows['use']; ?></option>
<?php }
mysql_free_result($result);?>
</select>
</form>