bluedollar
Programmer
I have a peice of code that displays a timetable for a conference:
======================================================
function listtimetable() {
//echo'<table border="0">';
echo'<dl>';
$currentdate='0000-00-00';
foreach ($this->idorder as $val) {
#Find values from timetable
$SQL = "select startdate from timetable where timetable_id = '$val'";
$start = $this->obconnect->selectcol($SQL,"startdate"
;
$SQL = "select enddate from timetable where timetable_id = '$val'";
$end = $this->obconnect->selectcol($SQL,"enddate"
;
$SQL = "select title from timetable where timetable_id = '$val'";
$title = $this->obconnect->selectcol($SQL,"title"
;
$SQL = "select speaker_id from timetable where timetable_id = '$val'";
$speaker = $this->obconnect->selectcol($SQL,"speaker_id"
;
#format dates and times
$temp = explode (" ",$start);
$temp1d = explode (":",$temp[1]);
$temp2 = explode(" ",$end);
$temp2d = explode (":",$temp2[1]);
$date = $temp[0];
$time1 = ''.$temp1d[0].':'.$temp1d[2].'';
$time2 = ''.$temp2d[0].':'.$temp2d[2].'';
#Display date
if ($currentdate != $date) {
$etime = explode ("-",$date);
$ttime = mktime(0,0,0,$etime[1],$etime[2],$etime[0]);
$ddate = date("l, n, M, Y", $ttime);
echo'<dt><b>'.$ddate.'</b></dt>';
}
#Display time
if ($speaker==""
{
echo'<dd>'.$time1.'-'.$time2.' '.$title.'</dd>';
}
else {
echo'<dd>'.$time1.'-'.$time2.' <A href="">'.$title.'</A></dd>';
}
$currentdate = $date;
}
echo'</dl>';
}
======================================================
This works fine and produces (example) output as follows:
Tuesday, 8, Aug, 2003
08:00-09:00 Breakfast
12:00-13:00 Lunch
19:00-20:00 <A>Computer Graphics</A>
If the timetable event involves speakers then a link is provided to a page displaying info about the speakers, eg. in the example above Computer Graphics has a link to a page that shows info about speakers that are speaking at 19:00-20:00 about computer graphics.
QUESTION
I need to work out how to have a link to a dynamically created page, that will contain info about speakers. Basically what I need to work out is how to pass the string $speaker (containing speakers id`s) to the page (so that I know which speakers info to display on that page).
If anyone has any ideas, your help would be invaluable.
Thanks
Dan
======================================================
function listtimetable() {
//echo'<table border="0">';
echo'<dl>';
$currentdate='0000-00-00';
foreach ($this->idorder as $val) {
#Find values from timetable
$SQL = "select startdate from timetable where timetable_id = '$val'";
$start = $this->obconnect->selectcol($SQL,"startdate"

$SQL = "select enddate from timetable where timetable_id = '$val'";
$end = $this->obconnect->selectcol($SQL,"enddate"

$SQL = "select title from timetable where timetable_id = '$val'";
$title = $this->obconnect->selectcol($SQL,"title"

$SQL = "select speaker_id from timetable where timetable_id = '$val'";
$speaker = $this->obconnect->selectcol($SQL,"speaker_id"

#format dates and times
$temp = explode (" ",$start);
$temp1d = explode (":",$temp[1]);
$temp2 = explode(" ",$end);
$temp2d = explode (":",$temp2[1]);
$date = $temp[0];
$time1 = ''.$temp1d[0].':'.$temp1d[2].'';
$time2 = ''.$temp2d[0].':'.$temp2d[2].'';
#Display date
if ($currentdate != $date) {
$etime = explode ("-",$date);
$ttime = mktime(0,0,0,$etime[1],$etime[2],$etime[0]);
$ddate = date("l, n, M, Y", $ttime);
echo'<dt><b>'.$ddate.'</b></dt>';
}
#Display time
if ($speaker==""

echo'<dd>'.$time1.'-'.$time2.' '.$title.'</dd>';
}
else {
echo'<dd>'.$time1.'-'.$time2.' <A href="">'.$title.'</A></dd>';
}
$currentdate = $date;
}
echo'</dl>';
}
======================================================
This works fine and produces (example) output as follows:
Tuesday, 8, Aug, 2003
08:00-09:00 Breakfast
12:00-13:00 Lunch
19:00-20:00 <A>Computer Graphics</A>
If the timetable event involves speakers then a link is provided to a page displaying info about the speakers, eg. in the example above Computer Graphics has a link to a page that shows info about speakers that are speaking at 19:00-20:00 about computer graphics.
QUESTION
I need to work out how to have a link to a dynamically created page, that will contain info about speakers. Basically what I need to work out is how to pass the string $speaker (containing speakers id`s) to the page (so that I know which speakers info to display on that page).
If anyone has any ideas, your help would be invaluable.
Thanks
Dan