Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2000
    Location
    Tacoma, Washington
    Posts
    9,576

    Post


    Hi,

    I'm getting an error with the following script at line 49. It says I'm having a parsing error. If anyone can check this out a little and see if it's an error in the script it would be greatly appreciated. Failing that any ideas about a script that may be causing the error that's connected to this one (there's quite a few in the whole thing *lol*)

    Greg Moore




    <?include "connect.php3"; ?>
    <?include "authorize-access.php3" ; ?>
    <?include "verify-parameters.php3" ; ?>
    <?

    /* To modifiy the flag of the notebook, you must own it */
    if ($visitor_id != $user_id) {

    $error_message = "You do not have permission to modify the access flag of the notebook owned by $user_name. <br>If you are $user_name, please go back to <a href=\"$system_url\">the initial page</a> and login again.\n" ;
    include "error-page.php3" ;
    exit ;
    }

    $sql = "update notebooks set is_public='$is_public' where notebook_id=$notebook_id" ;
    if ( ($result=mysql_db_query($database,$sql)) == 0) {
    include "db-error.php3" ;
    exit ;
    }
    echo "
    <html>
    <head>
    <title>Modify flag</title>
    </head>
    <body bgcolor=#ffffff text=#000000>

    <font size=+2>Access Flag Modified</font>" ;

    include "show-nav.php3" ;

    echo "<HR>" ;

    if ($is_public == 't') {
    $notebook_URL = $system_url . "entries.php3?notebook_id=$notebook_id" ;
    echo "The notebook is now accessible by all users. If you want to point people to this notebook, you can distribute the URL <blockquote><a href=\"$notebook_URL\">$notebook_URL</a></blockquote><p>" ;
    } else {
    echo "The notebook will not be public." ;
    }

    echo "

    <br>Go to <a href=\"notebooks.php3?user_id=$user_id\">your notebooks page</a> to continue working.

    " ;

    include "bottom.php3" ;

    /* Header("Location: notebooks.php3?user_id=$user_id") ; */
    exit ;
    }
    ?>
    Former Webhost... now, just a guy.

  2. #2
    Join Date
    Oct 2000
    Posts
    337
    At first glance, it looks like you need to remove the curly brace (}) right before the final PHP closing tag.

  3. #3
    Join Date
    Aug 2000
    Location
    Tacoma, Washington
    Posts
    9,576
    Thanks,

    Umm, do you mean the curly tag pointed out below?


    } else {
    echo "The notebook will not be public." ;
    } <-----THIS ONE? -------

    echo "

    Greg Moore
    Former Webhost... now, just a guy.

  4. #4
    Use this

    <?
    include ('connect.php3');
    include ('authorize-access.php3');
    include ('verify-parameters.php3');


    /* To modifiy the flag of the notebook, you must own it */
    if ($visitor_id != $user_id) {

    $error_message = "You do not have permission to modify the access flag of the notebook owned by $user_name. <br>If you are $user_name, please go back to <a href=\"$system_url\">the initial page</a> and login again.\n" ;
    include "error-page.php3" ;
    exit ;
    }

    $sql = "update notebooks set is_public='$is_public' where notebook_id=$notebook_id" ;
    if ( ($result=mysql_db_query($database,$sql)) == 0) {
    include "db-error.php3" ;
    exit ;
    }
    echo "
    <html>
    <head>
    <title>Modify flag</title>
    </head>
    <body bgcolor=#ffffff text=#000000>

    <font size=+2>Access Flag Modified</font>" ;

    include "show-nav.php3" ;

    echo "<HR>" ;

    if ($is_public == 't') {
    $notebook_URL = $system_url . "entries.php3?notebook_id=".$notebook_id;
    echo "The notebook is now accessible by all users. If you want to point people to this notebook, you can distribute the URL <blockquote><a href=\"$notebook_URL\">$notebook_URL</a></blockquote><p>" ;
    } else {
    echo "The notebook will not be public." ;
    }

    echo "

    <br>Go to <a href=\"notebooks.php3?user_id=$user_id\">your notebooks page</a> to continue working.

    " ;

    include "bottom.php3" ;

    /* Header("Location: notebooks.php3?user_id=".$user_id) ; */
    exit ;
    ?>
    The Php Support Desk
    http://www.phpsupportdesk.com
    Custom programming - kunal @ e-phoria.com
    http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

  5. #5
    Join Date
    Oct 2000
    Posts
    337
    Yep, Kunal's got it.... the very last curly brace after the commented-out "Header" call.


  6. #6
    Yup. Also, he waa using the <? ?> tag too many times. Just made a lil change there to.
    The Php Support Desk
    http://www.phpsupportdesk.com
    Custom programming - kunal @ e-phoria.com
    http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

  7. #7
    Join Date
    Oct 2000
    Posts
    337
    Yeah, while that doesn't hurt anything, it makes it a little weird to read.

  8. #8
    It just calls the PHP engine many more times and shuts it down many more times. I dun like tiring the poor guy out
    The Php Support Desk
    http://www.phpsupportdesk.com
    Custom programming - kunal @ e-phoria.com
    http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

  9. #9
    Join Date
    Aug 2000
    Location
    Tacoma, Washington
    Posts
    9,576
    Kunal,

    you're a scholar and a gentleman. I changed that script and it's running fine now.

    Thanks.

    Greg Moore
    Former Webhost... now, just a guy.

  10. #10
    lol.. thanx

    If you need any more help, drop me email or icq message
    The Php Support Desk
    http://www.phpsupportdesk.com
    Custom programming - kunal @ e-phoria.com
    http://www.pingzine.com - Ping!Zine. the FREE, FRESH and EXCITING Web Hosting Magazine...

Posting Permissions

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