Results 1 to 10 of 10
Thread: Parse error problem
-
11-08-2000, 02:22 AM #1ex-Aussie
- Join Date
- Aug 2000
- Location
- Tacoma, Washington
- Posts
- 9,576
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.
-
11-08-2000, 02:46 AM #2Web Hosting Guru
- 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.
-
11-08-2000, 03:23 AM #3ex-Aussie
- 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.
-
11-08-2000, 03:46 AM #4Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,750
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...
-
11-08-2000, 03:49 AM #5Web Hosting Guru
- Join Date
- Oct 2000
- Posts
- 337
Yep, Kunal's got it.... the very last curly brace after the commented-out "Header" call.
-
11-08-2000, 03:55 AM #6Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,750
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...
-
11-08-2000, 03:58 AM #7Web Hosting Guru
- Join Date
- Oct 2000
- Posts
- 337
Yeah, while that doesn't hurt anything, it makes it a little weird to read.
-
11-08-2000, 04:03 AM #8Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,750
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...
-
11-08-2000, 06:20 AM #9ex-Aussie
- 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.
-
11-08-2000, 06:30 AM #10Web Hosting Master
- Join Date
- Aug 2000
- Posts
- 2,750
lol.. thanx
If you need any more help, drop me email or icq messageThe 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...