PHP, Mysql and html (dreamweaver) linking help!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
am09arz
Forum Newbie
Posts: 1
Joined: Fri Nov 25, 2011 7:11 am

PHP, Mysql and html (dreamweaver) linking help!!!

Post by am09arz »

im finding it hard to link PHP, MySQL and dreamweaver together.

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>  
maxx99
Forum Contributor
Posts: 142
Joined: Mon Nov 21, 2011 3:40 am

Re: PHP, Mysql and html (dreamweaver) linking help!!!

Post by maxx99 »

Code looks fine.
Maybe this will somehow help?
http://kb2.adobe.com/cps/165/tn_16575.html
Post Reply