Jump to content


Photo

DEBUG HELP!


  • Please log in to reply
3 replies to this topic

#1 me1000

me1000
  • Members
  • PipPipPip
  • Advanced Member
  • 183 posts

Posted 06 September 2006 - 01:58 AM

Can someone please tell me what is wrong?

Im guessing i forgot a ; but i cant find anything...

<?
include("config.php");
//All this grabs the content from the database, so the template page can access it!

$inPageID       = (is_numeric($_REQUEST['id'])) ? $_REQUEST['id'] : 1;

// You remember this!

if (isset($inPageID)) {

	// This is similar to the edit code

	$query = "SELECT * FROM $sTableName WHERE ID=$inPageID LIMIT 1";

	$_CONTENT = mysql_fetch_array(mysql_query($query));

		//define page variables
		$full_address = $_CONTENT['ADDRESS'] ."<br>" . $_CONTENT['CITY'] . "," . $_CONTENT['ZIP'] ;
		$name = "Owner:".$_CONTENT['NAME'] ;
		
		//Define long image var
		if ($_CONTENT['IMAGE'] == "none" ) {
			$image = '<img src="'.$_CONTENT['IMAGE'].'" border="1">' ;
			
		}else{
			$image = '<img src="'.$_CONTENT['IMAGE'].'" width="200" height="218" border="1">' ;
		}			

//}  else { 
//	echo "Redirecting to homepage:::  NOTE TO SELF: ADD REDIRECTION"  ;
//	}
?>

BTW im getting a


Parse error: parse error, unexpected $ in /house/includes/show_one.php on line 32


Thanks,
Me1000

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 06 September 2006 - 02:07 AM

more likely a { } problem
follow me on twitter @PHPsycho

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 06 September 2006 - 02:07 AM

You have commented out the closing } for the first if statement. So change:
//}  else { 
//	echo "Redirecting to homepage:::  NOTE TO SELF: ADD REDIRECTION"  ;
//	}
To this:
} // this closes the first if statement
//  else { 
//	echo "Redirecting to homepage:::  NOTE TO SELF: ADD REDIRECTION"  ;
//	}


#4 me1000

me1000
  • Members
  • PipPipPip
  • Advanced Member
  • 183 posts

Posted 06 September 2006 - 02:12 AM

Thank you that was it,

I knew it was something simple!



Thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users