Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "root";
- $password = "";
- $hostname = "localhost";
- //connection to the database
- $dbhandle = mysql_connect($hostname, $username, $password)
- or die("Unable to connect to MySQL");
- $selected = mysql_select_db("socyo",$dbhandle)
- or die("Could not select nothing");
- $query="SELECT * FROM utente";
- $sql=mysql_query($query);
- $count=mysql_num_rows($sql);
- $array=array();
- for($i=0;$i<$count;$i++){
- $array[$i]=mysql_fetch_assoc($sql);
- ?>
- <section id="section-<?=$array[$i]['id']?>">
- <div class="mediabox">
- <h3><?=$array[$i]['titolo']?></h3>
- <p><?=$array[$i]['desc']?><p>
- </div>
- </section>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement