Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- • Bootstrap Grid system with "News-Updates"
- ○ The information comes from sql server
- ○ Contact Modal works as in the tutorial
- I want to send the row id of the news article via $_GET
- It works together with the Javascript identifier
- I only get to see the Modal backdrop :(
- -----------------------------------------------------------------------------------------------------------------------------------------
- -----------------------------------------------------------------------------------------------------------------------------------------
- <div class = "container">
- <div class = "row">
- <?php
- $count = "3"; //Article count blox (example: 3 --> 3/12=4 means 4 news boxes will appear)
- $query = "SELECT * FROM news ORDER BY id DESC LIMIT 4";
- $result = mysql_query($query);
- if (!$result)
- {
- echo mysql_error() . $query;
- }
- else
- {
- while($row = mysql_fetch_array($result))
- {
- echo
- '<div class = "col-md-' . $count . ' float-left"><div style="height:250px;" class="alert alert-info alert-dismissible">
- <button class="close" data-dismiss="alert">×</button>
- <h3 class="text-center"><a href = "?article_nr=' . $row['id'] . '&#update" data-toggle = "modal">' .
- $row['title'] . '</a></h3><h4>' .
- $row['subject'] . '</h4><p>' .
- $row['text'] . '</p><br><br><br>' .
- '<div class="b-1">
- <a data-toggle="modal" href="?article_nr=' . $row['id'] . '#news" class="btn btn-primary">Read more</a>
- <h5 style=" margin:0; float:right; display:inline-block; top:20px;"><small>' .
- mb_strimwidth($row['date'], 14, 14) . ' ' . mb_strimwidth($row['date'], 5, 5) . '</small></h5></div></div></div>';
- }
- }
- ?>
- </div>
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement