problem ob

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

martex
New php-forum User
New php-forum User
Posts: 1
Joined: Thu Apr 18, 2013 4:22 am

problem ob

Postby martex » Thu Apr 18, 2013 4:53 am

it gives me a message not know how to remove it
ob_start

http://www.zielonapracownia.net/admin.php

admin.php

Code: Select all

<?php
ob_start();
session_start();
require('header_panel.php');
require("adminutils.php");

if($_SESSION['user'] > 0){
   require("adminmenu.php");
   echo"<br>";
   echo "Witaj w panelu admina!";
}
else{
   require("adminlogin.php");
}

?>


adminutils.php

Code: Select all

<?php
ob_start();
require('db.php');

function login($login, $haslo){
   global $pdo;
   
   $stmt = $pdo -> prepare("SELECT id FROM users WHERE login =:login AND haslo =:haslo");
   $stmt -> bindValue(":login", $login, PDO::PARAM_STR);
   $stmt -> bindValue(":haslo", $haslo, PDO::PARAM_STR);
   $stmt -> execute();
   
   while($row = $stmt->fetch(PDO::FETCH_ASSOC)){
      return $row['id'];
   }
   return 0;

}

function printForm(){
   echo "<br><br>";
   echo "<form method='post' action='admin.php'>";
   echo "<input type=text name=login placeholder='Login'><br>";
   echo "<input type=text name=haslo placeholder='haslo'><br>";
   echo "<input type=submit value='zaloguj'>";
   echo "</form>";

}

session_start();

if(!isset($_SESSION['user'])){
   $_SESSION['user'] = 0;
}
?>


header_panel.php

Code: Select all

<!doctype html> 
   <head>
   <meta charset="UTF-8">
   <title>zielonapracownia.net</title>
   <link rel="icon" href="images/favicon.gif" type="image/x-icon"/>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
     <![endif]-->

   <link rel="shortcut icon" href="images/favicon.gif" type="image/x-icon"/>
   <link rel="stylesheet" type="text/css" href="css/panel.css"/>
   <link rel="stylesheet" href="css/scrween.css" type="text/css" media="screen" />
      
   
   </head>
   <body>
   <div id="wrapper">


Why show me an empty Buffor the logging??

Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], krotbacca and 2 guests