Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- marked -->
- <script src="js/marked.min.js"></script>
- <script src="js/highlight.pack.js"></script>
- <!-- plugin script -->
- <script src="js/bootstrap-suggest.js"></script>
- <div class="form-group">
- <label for="comment">start typing with @</label>
- <textarea class="form-control" rows="5" id="comment"></textarea>
- </div>
- hljs.initHighlightingOnLoad();
- // configure marked
- var renderer = new marked.Renderer();
- renderer.table = function (header, body) {
- return '
- <table class="table table-bordered table-striped table-hover">
- <thead>
- ' + header + '
- </thead>
- <tbody>
- ' + body + '
- </tbody>
- </table>';
- },
- marked.setOptions({
- sanitize: false,
- highlight: function (code) {
- return hljs.highlightAuto(code).value;
- },
- renderer: renderer,
- breaks: true
- });
- $.fn.extend({
- marked: function() {
- this.each(function() {
- $this = $(this);
- $this.html(marked($this.html()));
- })
- return this;
- },
- });
- $(function() {
- $('.markdown').marked();
- // data
- var users = [
- "users.php",
- ];
- $('#comment').suggest('@', {
- data: users,
- map: function(user) {
- return {
- value: user,
- text: '<strong>'+users+'</strong>'
- }
- }
- })
- })
- include_once 'koneksi.php';
- $query = $db_con->prepare("SELECT * FROM tb_users WHERE username LIKE ? ");
- $query->bindValue(':param', '%'.$param.'%', PDO::PARAM_STR);
- $query->execute();
- $row=$query->execute();
- if ($query->rowCount() > 0) {
- ?> <?php
- $username= array();
- while($row=$query->fetch(PDO::FETCH_OBJ)) {
- echo $row->username;
- <?php }
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement