Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

Welcome to Webmaster Forums 101!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th April 2003, 09:22 AM   #1
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default Parse error

What exactly is a parse error in php coding ive seen it lots in php scripts.
__________________
viper is offline   Reply With Quote
Old 8th April 2003, 09:28 AM   #2
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

It can be a lot of things.

I think it's mainly missing things like } or ; and so on.

When you get an error like that, have a look around the line where it said the error was and looking for missing things aswell as wrong code.

I don't really pay attention to the errors, I just go in and have a look where I've stuffed up.

The best place to find out more would be at:

http://www.php.net/
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 8th April 2003, 09:37 AM   #3
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default parse error

Ya thats what i thought it was too but i got this navigation script from hotscripts.com and i keep getting this error i emailed the guy who created it two days ago and he never wrote me back.I looked at the code but i don't know much about php yet and can't find it.
__________________
viper is offline   Reply With Quote
Old 8th April 2003, 09:38 AM   #4
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Post it here :wink:
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 8th April 2003, 09:40 AM   #5
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default parse error

ok heres the code.




<?php
// menunav.php - use as include on each page.
// by jamie dyer
// see example at http://www.hogwaller.com
// First array. It contains the page names, which appear on the page.
$name*=*array*("&/",
********"Page 1", this is the line the error comes up on
********"Page 2",
********"Page 3",
********"Page 4",
********"Page 5",
********"Page 6",
********"Page 7",
********"Page 8",
********"Page 9",
********"Page 10");
// Second array. It contains the actual .php pages.********
$url*=*array*("/",
***********"page1.php",
***********"page2.php",
***********"page3.php",
***********"page4.php",
***********"page5.php",
***********"page6.php",
***********"page7.php",
***********"page8.php",
***********"page9.php",
***********"page10.php");
// Third array. Optional. It contains the title tags.
***********
$title*=*array*("Top of Site",
********"This is Page 1",
********"This is Page 2",
********"This is Page 3",
********"This is Page 4",
********"This is Page 5",
********"This is Page 6",
********"This is Page 7",
********"This is Page 8",
********"This is Page 9",
********"This is Page 10");
// Set the requested page. It will be used to "unlink" if true.
$file*=*basename($_SERVER['REQUEST_URI']);
// Set the referer. Used for the "Previous Page" link.
$back*=*$_SERVER['HTTP_REFERER'];
/* Count the number of elements in the $name array, and iterate through the elements. The number of elements in the three arrays ($name, $url, $title) must match. */
$namecount*=*count($name);
for*($i*=*0;*$i*<*$namecount;*$i++)
********{
// If current .php page being iterated matches requested page, "unlink" it.
*
********if*($url[$i]*==*$file)
****************{
*******echo*("<a*class=\"nolink\"*title=\"You*A re*Here\">$name[$i]</a><br>");
*********
****************}
// Otherwise, make it a live link.
********else
********{
echo*("<a*href=\"$url[$i]\"*title=\"$title[$i]\">$name[$i]</a><br>");
*********************************}
********}
echo*("<br>");
// As long as the referer and the current page don't match, make a "Previous page" link.
****
****if*($back*!==*$file)
****{
echo*("<a*href=\"$back\">Previous*Page</a><br>");
****}
****
?>
__________________
viper is offline   Reply With Quote
Old 8th April 2003, 09:43 AM   #6
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Do you know the line? it's a bit easier then looking right through then code.
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 8th April 2003, 09:44 AM   #7
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

I see the line text now :wink:
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 8th April 2003, 09:45 AM   #8
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

What's this:

$name = array ("&/",

Is that & supposed to be there?
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 8th April 2003, 09:46 AM   #9
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default parse

the error line is line 7.it's supposed to show the page names on the menubar.
__________________
viper is offline   Reply With Quote
Old 8th April 2003, 09:47 AM   #10
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Quote:
Originally Posted by Mr. Tech
What's this:

$name = array ("&/",

Is that & supposed to be there?

?
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP Error Ben Server-Side Scripting & Databases 1 1st March 2005 08:58 AM
I need help with a coding error. bonnro Server-Side Scripting & Databases 1 19th December 2004 09:11 PM
404 error page problems sredhead Website Design & Coding 2 27th October 2003 08:38 PM
Ride4Pain metguitarist Website Design Reviews 14 29th April 2003 11:41 AM

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 09:21 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore