Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $hostname = "localhost";
- $username = "******";
- $password = "*******";
- $dbname = "*****";
- $usertable= "*******";
- $con = mysqli_connect ($hostname, $username, $password, $dbname);
- $sql="SELECT * FROM $usertable";
- $result=mysqli_query($con,$sql);
- $row = mysqli_fetch_array($result);
- if (mysqli_connect_errno()) {
- echo "failed".mysqli_connect_error();
- }
- else {
- while($row != null) {
- $id = $row["ID"];
- $name = $row["post_name"];
- $content = $row["post_content"];
- $date = $row["post_date"];
- $link = $row["post_link"];
- echo '<div id="outer", class="border">'.
- '<div class="inner", style="background-image:url('.
- $name.');border-right:1px solid #ff6666"></div>'.
- '<div class="inner", style="width:69%;">'.
- $date.$content.'<a href="'.$link.'"><bold>here</bold></a>'.
- '</div></div>';
- }
- }
- mysqli_close($con);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement