rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit eae48a4a68280f0bf0f34f481bf096d893f4dabd
parent fb841839bbd6ecfe76a52d825c7ceaec97b95c9e
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun, 23 Nov 2014 14:49:21 +0100

try to fix variables problem

Diffstat:
Mcore/backend/blog/posts.php | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php @@ -7,7 +7,12 @@ * @author Marcel Radzio <info@nordgedanken.de> * @version 0.2 17/08/2014 19:39 */ - + include('../../core/config/connect.db.inc.php'); + //Check if Database connection established + if (mysqli_connect_errno()) { + printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error()); + exit(); + } #if ($empty){ # $post_id = "bug?"; # $post_title = "bug?"; @@ -19,12 +24,7 @@ //Check if Data in it read(); function read(){ - include('../../core/config/connect.db.inc.php'); - //Check if Database connection established - if (mysqli_connect_errno()) { - printf("Verbindung fehlgeschlagen: %s\n", mysqli_connect_error()); - exit(); - } + global $id, $connection, $read; if ($resultat = $connection->query('SELECT * FROM posts WHERE id LIKE '.$id)) { echo 'SELECT * FROM posts WHERE id LIKE '.$id; //Put database data in variables