Welcome Guest, Not a member yet? Register   Sign In
i cant found the error at index.php

im getting:

An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected end of file
Filename: /home/cole01/public_html/load/application/views/members/index.php
Line Number: 89
File: /home/cole01/public_html/load/application/controllers/Members.php
Line: 36
Function: view
File: /home/cole01/public_html/load/index.php
Line: 315
Function: require_once

the index.php code

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <title>CodeIgniter CSV Import</title>

    <!-- Bootstrap library -->
    <link rel="stylesheet" href="<?php echo base_url('assets/bootstrap/bootstrap.min.css'); ?>">
    <!-- Stylesheet file -->
    <link rel="stylesheet" href="<?php echo base_url('assets/css/style.css'); ?>">

<div class="container">
    <h2>Members List</h2>

    <!-- Display status message -->
    <?php if(!empty($success_msg)){ ?>
    <div class="col-xs-12">
        <div class="alert alert-success"><?php echo $success_msg; ?></div>
    <?php if(!empty($error_msg)){ ?>
    <div class="col-xs-12">
        <div class="alert alert-danger"><?php echo $error_msg; ?></div>
    <?php } ?>

    <div class="row">
        <!-- Import link -->
        <div class="col-md-12 head">
            <div class="float-right">
                <a href="javascript:void(0);" class="btn btn-success" onclick="formToggle('importFrm');"><i class="plus"></i> Import</a>

        <!-- File upload form -->
        <div class="col-md-12" id="importFrm" style="display: none;">
            <form action="<?php echo base_url('members/import'); ?>" method="post" enctype="multipart/form-data">
                <input type="file" name="file" />
                <input type="submit" class="btn btn-primary" name="importSubmit" value="IMPORT" >
        <!-- Data list table -->
        <table class="table table-striped table-bordered">
            <thead class="thead-dark">
                <?php if(!empty($members)){ foreach($members as $row){ ?>
                    <td><?php echo $row['id']; ?></td>
                    <td><?php echo $row['name']; ?></td>
                    <td><?php echo $row['email']; ?></td>
                    <td><?php echo $row['phone']; ?></td>
                    <td><?php echo $row['status']; ?></td>
                <?php } }else{ ?>
                <tr><td colspan="5">No member(s) found...</td></tr>
                <?php }  ?> ;
    function formToggle(ID){
        var element = document.getElementById(ID);
        if(element.style.display === "none"){
        element.style.display = "block";
        element.style.display = "none";
</html>      < ---------- at this point editor shows SYNTAX ERROR, unexpected $EOF

any idea

(This post was last modified: 04-16-2020, 03:22 AM by InsiteFX.)

PHP Code:
<?php if(!empty($success_msg)){ ?>
    <div class="col-xs-12">
        <div class="alert alert-success"><?php echo $success_msg?></div>
<?php ?>
if(!empty($error_msg)){ ?>
    <div class="col-xs-12">
        <div class="alert alert-danger"><?php echo $error_msg?></div>

<?php ?>

Now do you see your Error?

You were missing the first if statements closing php tag.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Theme © iAndrew 2016 - Forum software by © MyBB