} $var = $_GET['val']; $query = mysql_query("select * from note_tab WHERE sl='" . $var . "' "); $sql = mysql_fetch_array($query); $nt = $sql['note']; $hd = $sql['head']; $email = $sql['email']; function clean_dec($text) { $text = str_replace("&slcn", "\n", $text); $text = str_replace("&snglquot", "'", $text); $text = str_replace("&snglquot", "'", $text); return $text; } $hd = clean_dec($hd); $nt = clean_dec($nt); function clean($note) { $note = str_replace("&", "&", $note); $note = str_replace("'", "&snglquot", $note); $note = str_replace('"', """, $note); $note = str_replace(" ", " ", $note); $note = str_replace("\n", "&slcn", $note); $note = str_replace("<", "<", $note); return $note; } if ($email == $_SESSION['luser']) { ?> <div class="container"> <form role="form" method="post" action="">
<div class="container"> <div class="col-xs-12"> <?php function clean_dec($text) { $text = str_replace("&slcn", "<br />", $text); $text = str_replace("&snglquot", "'", $text); $text = str_replace("&snglquot", "'", $text); return $text; } include "common/database_connect.php"; $query = mysql_query("select * from note_tab WHERE email='" . $_SESSION['luser'] . "' "); $i = 1; while (($sql = mysql_fetch_array($query)) && $i++) { $hd = $sql['head']; $hd = clean_dec($hd); ?> <div class="<?php if (!(($i - 1) % 2)) { echo "even"; } else { echo "odd"; } ?> "> <div class="container"> <div class="row"> <a href="show.php?val=<?php echo $sql['sl']; ?> ">