خرید بک لینک
i have create a page with database coection with a textarea box .when i type some thing and submit then i want submitted text to appear on same page .
but i think its need ajax.
coection.php is database filea and message is table .

Code:

function show_msg(){
        include("coection.php");
        //if(isset($_POST['save'])){
               
                $ft=$db->prepare("select * from message where useremail=$_SESSION[email]");
                $ft->setFetchMode(PDO::FETCH_ASSOC);
                $ft->execute();
                echo "<script>alert('$_SESSION[email]')</script>";
                while($ed=$ft->fetch()):
               
                if($ed[user_message] != NULL){
                        echo"
               
                <article class=row>
            <div class=col-md-9 col-sm-9 col-md-offset-1 col-md-pull-1 col-sm-offset-0>
              <div class=panel panel-default arrow right>
                <div class=panel-heading>Reply</div>
                <div class=panel-body>
                  <header class=text-right>
                    <div class=comment-user><i class=fa fa-user></i> That Guy</div>
                    <time class=comment-date datetime=16-12-2014 01:05><i class=fa fa-clock-o></i> Dec 16, 2014</time>
                  </header>
                  <div class=comment-post>
                    <p>
                      $ed[user_message]
                    </p>
                  </div>
                  <p class=text-right><a href=# class=btn btn-default btn-sm><i class=fa fa-reply></i> reply</a></p>
                </div>
              </div>
            </div>
            <div class=col-md-2 col-sm-2 col-md-pull-1 hidden-xs>
              <figure class=thumbnail>
                <img class=img-responsive src= />
                <figcaption class=text-center></figcaption>
              </figure>
            </div>
          </article>";}
                               
       
        endwhile;
        //}
}

برچسب: نویسنده: آیلین رضوانی تاريخ: پنجشنبه 7 دی 1396 ساعت: 1:11

صفحه بندی