Firstly sorry for my bad english i hope u understand me.
Im working with a project with using PHP and HTML.
I want to create a blog so im working on a create admin panel.
I can already creating a topic but when i want to create one more it doesn't work it just editing first topic.
Screenshots are here: When i create first topic: http://prntscr.com/ihm637
When i try to enter one more topic: http://prntscr.com/ihm6lc
Admin Panel's codes
<?php
if(isset($_POST['headline'])){
$_SESSION['headline']=$_POST['headline'];
$_SESSION['shortdesc']=$_POST['shortdesc'];
$_SESSION['longdesc']=$_POST['longdesc'];
$_SESSION['photolink']=$_POST['photolink'];
$_SESSION['saved']=false;
}
?>
---.
And index's codes are here
<div class="content-grid">
<?php
//If topic didnt saved to web page do the following actions
if (isset($_SESSION['saved'])) {
if($_SESSION['saved']==false){
echo <<<EOT
<div class="content-grid-info">
<img src="$_SESSION[photolink]"/>
<div class="post-info">
<h4><a href="single.html"> $_SESSION[headline] </a> $_SESSION[date] </h4>
<p> $_SESSION[shortdesc] </p>
<a href="single.html"><span></span>READ MORE</a> -->
</div>
</div>
EOT;
}
}
$_SESSION['ready']=true;
?>
</div>
Feel free to ask u dont understand it.Hope can somebody can help me.
Have a good day for all.
Aucun commentaire:
Enregistrer un commentaire