This is what I have so far. Remember, I am using Dreamweaver so, it doesn't produce clean content. I know this isn't correct. It only returns one student profile since Dreamweaver's built in functions always thinks it is a single string. So, now, I have to convert this text into pulling in the array of the UID field. UID are integers. I hope you don't run once you read this code. 🙂
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_your_scholarships = "-1";
if (isset($_GET['UID'])) {
$colname_your_scholarships = $_GET['UID'];
}
mysql_select_db($database_connect, $connect);
$query_your_scholarships = sprintf("SELECT * FROM gc_codes, users INNER JOIN stu_app2008 ON users.UID = stu_app2008.UID INNER JOIN activities ON users.UID = activities.UID INNER JOIN coll_exp ON users.UID = coll_exp.UID INNER JOIN employ ON users.UID = employ.UID INNER JOIN fin_app ON users.UID = fin_app.UID INNER JOIN finaid ON users.UID = finaid.UID INNER JOIN stu_special ON users.UID = stu_special.UID WHERE users.UID = %s and gc_codes.GCID = users.GC", GetSQLValueString($colname_your_scholarships, "int"));
$your_scholarships = mysql_query($query_your_scholarships, $connect) or die(mysql_error());
$row_your_scholarships = mysql_fetch_assoc($your_scholarships);
$totalRows_your_scholarships = mysql_num_rows($your_scholarships);
?>
<?php $lastTFM_nest = "";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">