Many thanks for the help but I still can not get it work. Below are my codes that are on the maingpage.php:
<?php require_once('Connections/alumniConnection.php'); ?>
<?PHP
if(!isset($HTTP_GET_VARS["sectionID"])){
$sectnID = $HTTP_GET_VARS["sectionID"];
if ($sectnID != ""){
setcookie("whichSection", $sectnID, time()+3600);
}
}
else{
$dfrntSectionID = $HTTP_GET_VARS["sectionID"];
$sectnID = $HTTP_COOKIE_VARS["whichSection"];
if ($dfrntSectionID != $sectnID){
$sectnID = $dfrntSectionID;
}
}
//*************************************************************************************
$self = $HTTP_SERVER_VARS['PHP_SELF'];
$pixID = $HTTP_GET_VARS["imageID"];
$hdnPixID = $HTTP_POST_VARS["hdPixID"];
$btnClicked = $HTTP_POST_VARS["btnClick"];
$numPicsID = array();
//*********************Connect to database and query**************
mysql_select_db($database_alumniConnection, $alumniConnection);
if ($sectnID != ""){
$query_rsSection = "SELECT * FROM photoGallery WHERE sectionID = ".$sectnID;
$rsSection = mysql_query($query_rsSection, $alumniConnection) or die(mysql_error());
$totalRows_rsSection = mysql_num_rows($rsSection);
$numOfPics = array($totalRows_rsSection);
}
//******************in the body tag****************************
if ($sectnID !=""){
$numOfCells=1;
}
if ($totalRows_rsSection >0){
if ($numOfCells ==1){
$src = 'galleryThumbNail.php';
echo '<iframe src="'.$scr.('?var='.$sectnID:'').'" id="thumbnail" width="535" height="100" frameborder="0" scrolling="auto" name="myInlineFrame"></iframe>';
}
}
else{ message();}
?>
The error occurs on this line
echo '<iframe src="'.$scr.('?var='.$sectnID:'').'" id="thumbnail" width="535" height="100" frameborder="0" scrolling="auto" name="myInlineFrame"></iframe>';
What I'm trying to do here is passing the variable $sectnID to the myIframePage.php page that is in the iframe.
Any help is grateful!
ljCharlie