Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 02-01-2011, 07:54 AM
The Codfin Keeper's Avatar
The Codfin Keeper The Codfin Keeper is offline
A Codfin draws near!
 
Join Date: Jan 2011
Location: Either CT or the Slug's house
Posts: 91
Gender: Male
Credits: 11,287
The Codfin Keeper is on a distinguished road
Default unexpected T_STRING

I keep getting this error:

Parse error: syntax error, unexpected T_STRING in /home/a5010171/public_html/index.php on line 80

and this is my code:

PHP Code:
<?php

// **********************************************************************
// Mysidia Adoptables Script: index.php
// Copyright 2011 Mysidia Adoptables staff team
// For help and support: http://www.mysidiaadoptables.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************


// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"inc/bbcode.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("any");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];


// Convert the BBCODE to HTML
$article_content bbconvert($article_content);

// Convert line breaks to <br>
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************
$article_content $article_content."<p>Only for a limited time - receive a special item when you visit this page!";
if (
$isloggedin == "yes") {
$result mysql_query("SELECT * FROM ".$prefix."useritems WHERE owner = '$loggedinname');
$num = mysql_numrows($result);

$i = 0;
$oh = 0;

while (i < 
$num){
$isit = @mysql_query($result,'0','Item');
if (
$isit == "Pile of Ice Blocks") {
$oh = 'oh';
}
else {}

i++;
}

if (
$oh == 'oh'){
mysql_query("
INSERT INTO ".$prefix."owned_adoptables VALUES ('','$loggedinname','Pile of Ice Blocks')");
}
else if (
$oh == 0){
$article_content = $article_content."<br>You have already received this item.";
}
}
else {
$article_content = $article_content."<p>You must be logged in to receive the item.";
}

// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file = $themeurl;

// Do the template changes and echo the ready template
$template = file_get_contents($file);

$template = replace(':ARTICLETITLE:',$article_title,$template);
$template = replace(':ARTICLECONTENT:',$article_content,$template);
$template = replace(':ARTICLEDATE:',$article_date,$template);

$template = replace(':BROWSERTITLE:',$browsertitle,$template);
$template = replace(':SITENAME:',$sitename,$template);

//Define our links
$template = replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar = getsidebar();
$template = replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template = replace(':ADS:',$ads,$template);

//Get the slogan info
$template = replace(':SLOGAN:',$slogan,$template);


echo 
$template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
What's wrong with it? Line 80 is the "if ($isit == "Pile of Ice Blocks") {" line.
__________________

Yacker
Quote:
Originally Posted by Mankey Pokemon Card when another one is on top of it
([33) Ka\______
Does 40 damage\___
counter on Mankey. \______
  #2  
Old 02-01-2011, 07:57 AM
fadillzzz fadillzzz is offline
Dev Staff
 
Join Date: Jan 2010
Posts: 501
Gender: Male
Credits: 32,667
fadillzzz is an unknown quantity at this point
Default

Try this code
PHP Code:
<?php

// **********************************************************************
// Mysidia Adoptables Script: index.php
// Copyright 2011 Mysidia Adoptables staff team
// For help and support: http://www.mysidiaadoptables.com/forum/
//
// Redistribution prohibited without written permission
// **********************************************************************


// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"inc/bbcode.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("any");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];


// Convert the BBCODE to HTML
$article_content bbconvert($article_content);

// Convert line breaks to <br>
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************
$article_content $article_content."<p>Only for a limited time - receive a special item when you visit this page!";
if (
$isloggedin == "yes") {
$result mysql_query("SELECT * FROM ".$prefix."useritems WHERE owner = '$loggedinname'");
$num mysql_numrows($result);

$i 0;
$oh 0;

while (
$num){
$isit = @mysql_query($result,'0','Item');
if (
$isit == "Pile of Ice Blocks") {
$oh 'oh';
}
else {}

i++;
}

if (
$oh == 'oh'){
mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('','$loggedinname','Pile of Ice Blocks')");
}
else if (
$oh == 0){
$article_content $article_content."<br>You have already received this item.";
}
}
else {
$article_content $article_content."<p>You must be logged in to receive the item.";
}

// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links
$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar getsidebar();
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


echo 
$template;

// **********************************************************************
// End Template Definition
// **********************************************************************



?>
  #3  
Old 02-01-2011, 08:18 AM
The Codfin Keeper's Avatar
The Codfin Keeper The Codfin Keeper is offline
A Codfin draws near!
 
Join Date: Jan 2011
Location: Either CT or the Slug's house
Posts: 91
Gender: Male
Credits: 11,287
The Codfin Keeper is on a distinguished road
Default

Thank you! I now have it working
__________________

Yacker
Quote:
Originally Posted by Mankey Pokemon Card when another one is on top of it
([33) Ka\______
Does 40 damage\___
counter on Mankey. \______
  #4  
Old 02-01-2011, 12:40 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 32,070
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Just to point out the error, I know it's already been fixed but you can tell right away from the difference in the color of the codes.

$result = mysql_query("SELECT * FROM ".$prefix."useritems WHERE owner = '$loggedinname');

That line is missing a double quote " which messes everything after it up.
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
  #5  
Old 02-01-2011, 04:09 PM
The Codfin Keeper's Avatar
The Codfin Keeper The Codfin Keeper is offline
A Codfin draws near!
 
Join Date: Jan 2011
Location: Either CT or the Slug's house
Posts: 91
Gender: Male
Credits: 11,287
The Codfin Keeper is on a distinguished road
Default

Oh, now I see. Thanks also!
__________________

Yacker
Quote:
Originally Posted by Mankey Pokemon Card when another one is on top of it
([33) Ka\______
Does 40 damage\___
counter on Mankey. \______
  #6  
Old 02-01-2011, 07:13 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 32,070
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Solved and locked!
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Closed Thread

Thread Tools
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

BB 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
Parse error: syntax error, unexpected T_STRING MikiHeart Questions and Supports 29 10-31-2013 12:46 AM
Due to an unexpected heavy snow in Pennsylvania... Hall of Famer Mysidia Adoptables Official Announcement 12 11-04-2011 11:43 AM
Parse error: syntax error, unexpected T_ELSE in /home/.nyles/ Saphira Questions and Supports 11 05-26-2009 11:45 AM


All times are GMT -5. The time now is 09:03 PM.

Currently Active Users: 527 (0 members and 527 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636