Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26

Thread: Parse error

  1. #1
    Join Date
    Oct 2003
    Location
    Shah Alam - Kuantan -Alor Setar
    Posts
    109
    Rep Power
    202

    Parse error

    Aku dah install php, aku try buat satu simpel website ngan php untuk nak test balik php ni. Sebab aku baru pas format hd aku. Tetibe jer kluar error mcm ni.

    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\inetpub\wwwroot\madrasah\test\index.php on line 37

    Apa maslahnya?

  2. #2
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    199
    inetpub? entah la sbb aku guna apache... ko guna webserver iis ke? aku rasa cam tak bleh jee.. cuba ko guna apache web server tp ko kena remove dulu exiting IIS ko tu... kang conflict salahkan aku plak... hehheh
    To follow the path:
    Look to the master,
    Follow the master,
    Walk with the master,
    See through the master,
    Become the master.

  3. #3
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    254
    your code may contain error(s), perhaps you forgot a small semicolon (;) or close bracket ()).

    Please show us the code, then we can debug for you.

  4. #4
    Join Date
    Oct 2003
    Location
    Shah Alam - Kuantan -Alor Setar
    Posts
    109
    Rep Power
    202
    <table width="519" border="0" height="392" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
    <?
    if($page =="aqidah")
    {
    include ("aqidah.php");
    }
    if($page=="elearning")
    {
    include ("elearning.php");
    }
    else if($page=="")
    {
    include ("main.php");
    }

    ?>
    </td>
    </tr>
    </table>
    Ok, dah guna apache. Coding yang bermasalah adalah coding diatas. Dah tak keluar error yang sebelum ni. Tapi bila user click elearning sepatutnya kat index.php akan include elearning.php . Tapi apa yang berlaku, bila user click elearning. Dekat index.php still include main.php jugak. Ada kemungkinan masalah dengan php.ini atau httpd.conf tak?

  5. #5
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    254

  6. #6
    Join Date
    Oct 2003
    Location
    Shah Alam - Kuantan -Alor Setar
    Posts
    109
    Rep Power
    202
    still the some, i do change else if to elseif. But the problem is there it stand.

  7. #7
    Join Date
    Apr 2004
    Location
    Miri, Sarawak
    Posts
    93
    Rep Power
    194
    <?php
    if($page =="aqidah")
    {
    include ("aqidah.php");
    }
    if($page=="elearning")
    {
    include ("elearning.php");
    }
    else if($page=="")
    {
    include ("main.php");
    };
    ?>

    that might help.... hmmm......
    Don't Ask Me Why I Joined This Forum
    GeminiGeek's Online Journal

  8. #8
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    233
    Make sure $page refers to something, for example $page = $_GET['page'];

    Try (as lcf said):
    PHP Code:
    <table width="519" border="0" height="392" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
    <?
    if($page =="aqidah")
    {
       include (
    "aqidah.php");
    }
    elseif(
    $page=="elearning")
    {
       include (
    "elearning.php");
    }
    else
    {
       include (
    "main.php");
    }

    ?>
    </td>
    </tr>
    </table>

  9. #9
    Join Date
    Oct 2003
    Location
    Shah Alam - Kuantan -Alor Setar
    Posts
    109
    Rep Power
    202
    thanks sufyan, $page = $_GET['page']; <--- working.

    thanks to you to lcf. Terimkasih semua la.

  10. #10
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    254
    np. I was assume your other code in page is correct.

  11. #11
    Join Date
    Oct 2001
    Location
    Melbourne, AU
    Posts
    456
    Rep Power
    233
    no prob

  12. #12
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    238
    $_GET[VAR] utk php yg latest lah kalau tak kene guna full env
    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  13. #13
    Join Date
    Oct 2003
    Location
    Shah Alam - Kuantan -Alor Setar
    Posts
    109
    Rep Power
    202
    hymns, so. Kalau ada input text name=nama dari page submit.php. That mean

    $_GET['nama']

    is it right. Pening la php yg baru ni. Dah lama tak guna php. Nak insert dalam db. Tapi value tak masuk.

  14. #14
    Join Date
    Nov 2001
    Location
    Johor
    Posts
    772
    Rep Power
    238
    nop!

    submit method = POST
    so $_POST[var]

    I hate when:

    vBulletin Message:
    Sorry! The administrator has specified that users can only post one message every 60 seconds

  15. #15
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    199
    then kalau post by url baru la guna $_GET[var]...
    To follow the path:
    Look to the master,
    Follow the master,
    Walk with the master,
    See through the master,
    Become the master.

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. parse value dari textbox ke textbox...URGENT
    By arsenalfc82 in forum Website Programming
    Replies: 9
    Last Post: 13-01-2008, 02:07 PM
  2. Internal Server Error - ASP error
    By ladyheart2612 in forum Website Programming
    Replies: 0
    Last Post: 21-07-2005, 09:22 AM
  3. lot of error
    By prozone in forum Website Programming
    Replies: 2
    Last Post: 19-07-2005, 02:39 PM
  4. Help-error
    By hyllda in forum Website Programming
    Replies: 18
    Last Post: 21-10-2003, 12:32 PM
  5. how to make function that automatically parse url
    By full time kille in forum Website Programming
    Replies: 6
    Last Post: 08-11-2002, 05:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112