0

i'm keep receiving this notification and i've been searching and editing the code for around 5-6 hours and it doesn't make any difference. kindly comment guys. seriously need your help.

<?php

function dispMenu0()
{
    ?>
        <div id="navigation">
        <ul id="nav">

        <li class="item1"><a href="main.php" title="Home"><span>Home</span></a></li>    

        <li class="item2"><a href="newcollection.php" title="New Collection"><span>Collection</span></a></li>                       

        <li class="item2"><a title="Petty Cash"><span>Petty Cash</span></a>
            <ul>
            <li><a href="cashout.php" title="Pembayaran Tunai">Pembayaran Tunai</a></li>
            <li><a href="cashin.php" title="Penerimaan Tunai">Penerimaan Tunai</a></li>         
            </ul>       
        </li>

        <li class="item2"><a title="View Report"><span>Report</span></a>
            <ul>
            <li><a href="listowner.php" title="Complete listing (owner + unit)">Owner list</a></li>
            <li><a href="rptcollection.php" title="View monthly payment summary">Collection</a></li>
                        <li><a href="rptpymtvoucher.php" title="Report Payment voucher">Tunai Keluar</a></li>
                        <li><a href="rptcashin.php" title="Report Payment voucher">Tunai Masuk</a></li>
                        <li><a href="rptcashflow.php" title="Report Aliran TUnai" >Aliran Tunai</a></li>
            <li><a href="" title="Print Reminder letter">Print reminder</a></li>            
            </ul>       
        </li>

        <li class="item2"><a title="System Administrator"><span>Administrator</span></a>
            <ul>
            <li><a href="admin_unit.php" title="Manage Apartment Unit">Manage Unit</a></li>         
            <li><a href="admin_user.php" title="Manage User Account">Manage User</a></li>
            <li><a href="admin_collect.php" title="Collection Type">Collection</a></li>
            <li><a href="admin_backup.php" title="Backup Data">Backup Data</a></li>
            </ul>       
        </li>       

        <li class="item2"><a href="logout.php" title="Logout"><span> <font color="red">Logout</font></span></a>
        </li>                           
        </ul>
        </div>

    <?
}

?>

guys, after refering my code and please do give some comment and suggestion of editing the code.

Malvin Tan
  • 3
  • 1
  • 4

2 Answers2

1

Parse error: syntax error, unexpected '<'...

The error stems from short open tags not being set.

Either you change <? to <?php or set them.

For more information on this option, visit:

Change:

<?
}

?>

to

<?php
}

?>

Borrowed from https://stackoverflow.com/a/2185331/

Set

short_open_tag=On

in php.ini

And restart your Apache server.

See also this Q&A on Stack:

Community
  • 1
  • 1
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
  • kindly explain on the "Set short_open_tag=On in php.ini" would like to know what is php.ini and how to set short_open_tag=On? – Malvin Tan Dec 07 '14 at 03:04
  • @MalvinTan In your `php.ini` file, there is a setting that says `short_open_tag = Off`, it needs to be "on" if you wish to continue using ``. This is a file that came with your Wamp installation of PHP. Find that file in your computer and do a search for that setting. – Funk Forty Niner Dec 07 '14 at 03:05
0

Two ways: 1. You could use include './menu.html' to include that html code part 2. use EOF<<< string

Shwan
  • 21
  • 2