-1

i have 6 php pages, all work perfectly on pc and on host. except one, my search.php doesn't work on host (by the way it works on pc perfectly too). Somehow when i try to run search.php i don't even get error, only thing which i get is white screen. Here my codes ;

<?php
session_start();
if(!$_SESSION['auth'])
{
echo 'bu sayfaya erişim izniniz yok.';
header("Location: uyegirisi.html");
}
?>


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>First try</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>



<style>
    li
      {
        display: inline;
        padding: 0px 20px 0px 20px;
      }

    ul
      {
        padding:10px;
        background: rgba(0,0,0,0.5);
      }

    a
      {
        color: black;
        font-size: 30px;
      }

    p
      {
        color: #0f0f0f;
        font-size: 24px;
        font-family: Helvetica;
      }

    .bor
      {
        font-size: 23px;
        border:2px;
      }

    .hr
    {
      color : #0000F8;
      size : 4;
    }
</style>

</head>
<body>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4" align="center">
   <header>
     <ul>
       <li><a href="musterikayit.html">Kayıt ekranı</a></li>
         <li><a href="logout.php"> Çıkış Yap</a></li>



    </ul>
  </header>
          <form action="musteriarama.php" method="get">
              <div class="hiza">
                <label for="Arama"></label>
                  <input type="text" class="form-control" id="Arama" name="Arama">
                  </br>
                  </br>
                  <input class="but btn btn-primary btn-lg" type="submit" name="gonder" value="Müşteri Ara">

              </div>
         </form>

</div>
  <div class="col-md-4"></div>
</div>


</body>
</html>





<?php


$db =new mysqli('localhost', 'root', '' , 'musteritakip');
if($db->connect_errno) die ('Bağlantı hatası:' . $db->connect_errno);

if(isset($_GET['gonder'])){

#Ekleme işlemi

$stmt = $db ->prepare("select * from musteri_bilgileri where (isim like ?)");
if($stmt === FALSE) die("Sorgu hatası". $db ->error);
$ara ='%'.$_GET['Arama'].'%';
$stmt->bind_param("s", $ara);
$stmt->execute();
$sonuc =$stmt->get_result();


if($sonuc -> num_rows <1) die("<p>"."bulunamadı");




while ($row = $sonuc->fetch_array())
  {
    echo '<div>';
    echo '<p>'.$row['isim'];
    echo '&nbsp&nbsp&nbsp;';

    echo $row['soyad'];
    echo '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp';

    echo '<form action="detaylar.php" method="post">';
    echo'<input type="hidden" value="'.$row['id'].'" name="gelenid">';
    echo '<input type ="submit" value="Detaylar" style="margin-bottom:-35px;" name="detaylargonder"></input>';
    echo '<hr width="100%" >';

    echo '</form>';



    echo '</br>';
    echo '</br>';
    echo '</div>';
 }

 }
?>
iknk
  • 1
  • 1
  • 6

1 Answers1

-1

You must have missed something while you were uploading it. You haven't clearly described what's not working or about the error, we can only advice you.Follow below steps to solve your issue:

  1. First add error_reporting(E_ALL); ini_set('display_errors', 'On'); at top of your script.
  2. Check the browser's console log's, it will display relevant errors.
  3. As you are getting blank page, please check your code, you might be getting 500 internal server error when you haven't code it correctly.
  4. Check your syntax.
  5. Check your application & DB configuration.
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Varun Krish
  • 529
  • 4
  • 14