Professional Web Applications Themes

Settings problem? - PHP Development

Hi, below is my script which was working fine before and i have looked at the code for the past 2 hours but still get this error: "P error: p error, unexpected $end in c:\phpdev\www\bwh\project\my.details.php on line 84" I am on localhost, win2k machine,PHP Version 4.3.1. As you can see below it really a pretty simple script and line 84 is the last line AFTER php terminates, Please help. heres my code: <?php session_start(); header("Cache-control: private"); //IE 6 Fix require_once("configbwh.php"); error_reporting (E_ALL); if(isset($_SESSION['my_user']) && isset($_SESSION['my_ccno'])) { $mmy_user=$_SESSION['my_user']; $mmy_ccno=$_SESSION['my_ccno']; $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I cannot connect to the database ...

  1. #1

    Default Settings problem?

    Hi,
    below is my script which was working fine before and i have looked at the
    code for the past 2 hours but still get this error:
    "P error: p error, unexpected $end in
    c:\phpdev\www\bwh\project\my.details.php on line 84"

    I am on localhost, win2k machine,PHP Version 4.3.1.

    As you can see below it really a pretty simple script and line 84 is the
    last line AFTER php terminates, Please help.
    heres my code:
    <?php
    session_start();
    header("Cache-control: private"); //IE 6 Fix
    require_once("configbwh.php");
    error_reporting (E_ALL);

    if(isset($_SESSION['my_user']) && isset($_SESSION['my_ccno']))
    {
    $mmy_user=$_SESSION['my_user'];
    $mmy_ccno=$_SESSION['my_ccno'];


    $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I
    cannot
    connect to the database because: ' . mysql_error());
    mysql_select_db ("$db");

    $tt = "SELECT ptype, count(*) FROM list_slave WHERE ptype IN ('1', '2',
    '3','4','5') and userr='".$mmy_user."' and ccno='".$mmy_ccno."' GROUP BY
    ptype";

    if($res = mysql_query($tt))
    {

    $x = 1;
    while($row = mysql_fetch_row($res))
    { $var[$x++] = $row[1]; }

    }
    include("my.top.php");

    if (isset($var[1])){ $one = $var[1];} else {$one = 0;}
    if (isset($var[2])){ $two = $var[2];} else {$two = 0;}
    if (isset($var[3])){ $thr = $var[3];} else {$thr = 0;}
    if (isset($var[4])){ $fou = $var[4];} else {$fou = 0;}
    if (isset($var[5])){ $fiv = $var[5];} else {$fiv = 0;}
    $tot=$one + $two + $thr + $fou + $fiv;
    ?>
    <p> <b>W</b>elcome, this is your "MyList" control panel.<br>
    You may add/save all your favourite plans here for later comparision.<br>
    You can add upto 5 plans at a time and edit, delete them as and when you
    so
    wish.<br>
    </p>
    <table width="40%" border="0" align="center" cellpadding="0"
    cellspacing="0">
    <tr>
    <td colspan="2" NOWRAP><div align="center"><font color=red><b>Your
    current list of saved plans are:</div></font></b></td>
    </tr>
    <tr>
    <td width="24%"><strong>S</strong>hared:</td>
    <td width="38%"><?php echo $one; ?></td>
    </tr>
    <tr>
    <td><strong>D</strong>edicated:</td>
    <td><?php echo $two; ?></td>
    </tr>
    <tr>
    <td><strong>R</strong>eseller</td>
    <td><?php echo $thr; ?></td>
    </tr>
    <tr>
    <td><strong>C</strong>oLocation:</td>
    <td><?php echo $fou; ?></td>
    </tr>
    <tr>
    <td nowrap><strong>F</strong>reeHosting:</td>
    <td><?php echo $fiv; ?></td>
    </tr>
    <tr>
    <td colspan=2><strong>You have totally <font color=red><?php echo $tot;
    ?></font> plans saved. </strong></td>

    </tr>
    </table>
    <p><br>
    If you have any questions use the "contact us" link at the side and we
    will
    get back to you ASAP.<br>
    <br>
    Cheers,<br>
    -The BWH team.<br>
    </p>


    <?php
    include("my.bottom.php");
    ?>
    // This is line 84


    What do you think is there problem? some settings in php.ini or something?

    Cheers,
    -Ryan

    Ryan A Guest

  2. #2

    Default Re: [PHP] Settings problem?

    * Thus wrote Ryan A (ryanjumac.com):
    > [...]
    > if(isset($_SESSION['my_user']) && isset($_SESSION['my_ccno']))
    > {
    ^~~~ this never gets closed.


    I love vi and '%', has prevented headaches like this so meny times...

    Curt
    --
    "I used to think I was indecisive, but now I'm not so sure."
    Curt Zirzow Guest

Similar Threads

  1. Color Settings Problem
    By che ng in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: June 22nd, 01:17 PM
  2. problem with role settings and cfincludes
    By lzth01 in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: February 29th, 07:04 PM
  3. Settings manager Problem
    By rojharris in forum Macromedia Flash Player
    Replies: 0
    Last Post: January 11th, 11:02 AM
  4. Country settings problem
    By Markus Weber Megalith in forum ASP Components
    Replies: 13
    Last Post: August 11th, 01:16 PM
  5. display settings problem
    By Sameer in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: August 5th, 03:24 PM

Bookmarks

Posting Permissions

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

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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139