Wednesday, October 17, 2018

php - Parse error: syntax error, unexpected end of file on line 115




I have read any question related about this, and the answer said it was because "missing quite a few semicolon". I have checked my code and think that there aren't missing semicolon.. but this problem still happen to me. My friend, with same code with me, not encounter same problem.




Here's my code (line 115 is the ) :



// gunakan variabel session pada halaman ini. 
// fungsi ini harus diletakkan di awal halaman.
session_start();
////// Bagian Logout. Delete variabel session.
if(empty($_SESSION['username']) AND (empty($_SESSION['password']))){
// Re-direct ke index.php

header("location:memberlogin.html");
}
?>



Home















    Profile





    Nama

    include "connect.php";
    $user=$_SESSION['username'];
    $query = $con->prepare("select *
    from member where username='$user'");
    $query->execute();
    $niplama=$query->fetch();
    echo $niplama['nama'];

    ?>


    NIP

    echo $niplama['nip_lama'];
    echo " / ";
    echo $niplama['nip_baru'];
    ?>





    Web Service List :














    include "connect.php";
    $user = $_SESSION['username'];
    $id_user=$con->prepare("select id from member where username='$user'");
    $id_user->execute();

    $ini = $id_user->fetch();
    $id1 = $ini['id'];

    $query2 = $con->prepare("select * from web_service where id_pemesan='$id1'");
    $query2->execute();

    ?>

    $nmr = 1;

    while($service = $query2->fetch()){?>











    No Name Detail Keterangan Status
    Lihat











Answer



      Lihat




please change it as




    


and leave some space before all php end tags.


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...