Page 1 of 1

[SOLVED] Stumped -- take a look please?

Posted: Thu Jan 06, 2005 1:39 pm
by siefkencp
When I run this code I get the following error...
Parse error: parse error in /var/www/html/admin/admissions/name.php on line 39
Line 39 is the very end... Any one got any suggestions???

Thanks,
Chris

Code: Select all

<?php

include '/var/www/html/phplib/mysql_connect.php';
$name = explode(" ", $search);

foreach ($name as $key => $value){
	print "Searched for: ";
	print "$name[$key] <br><br>";
	
	$query_array = mysql_query ("SELECT people_code_id FROM admissions_stats WHERE first_name = '$name[$key]' OR last_name = '$name[$key]'")
	or die ("Not Found");
	
	while ($final_array = mysql_fetch_array($query_array, MYSQL_ASSOC)){
		$id = $final_array['people_code_id'];
		
		$detail_array = mysql_query ("SELECT * FROM admissions_stats WHERE people_code_id = '$id'")
		or die ("Not good" . mysql_error());
		
		$fin_detail_array = mysql_fetch_array($detail_array, MYSQL_ASSOC);
		
		$status_array = mysql_query ("SELECT app_status FROM admitxmascard WHERE people_code_id = '$id'")
		or die ("Not good" . mysql_error());

		$stat_detail_array = mysql_fetch_array($status_array, MYSQL_ASSOC);
	
		$firstname = $fin_detail_array['first_name'];
		$lastname = $fin_detail_array['last_name'];
		$status = $stat_detail_array['app_status'];
		
		print "<a href="power_id.php?power_id=$id">";
		print "$lastname, $firstname</a>";
			if ($status != '') {
			print "  -- Status: $status";
			}
		print "<br><br>";
		} 
include '/var/www/html/phplib/close.php';

?>
[/quote]

Posted: Thu Jan 06, 2005 1:41 pm
by feyd
mismatch of opening and closing braces: {}

hint: the foreach.

Posted: Thu Jan 06, 2005 1:42 pm
by markl999
Your missing a closing } to go with this line:

Code: Select all

foreach ($name as $key => $value){
[edit] Beaten to it :o

Posted: Thu Jan 06, 2005 1:43 pm
by feyd
mwahahahahhahah ;) :twisted:

Posted: Thu Jan 06, 2005 1:50 pm
by siefkencp
AHH HA i knew it was some dumb semi-colon or brace... thanks for the extra eyes...

Chris