Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a string to a linked dynamic page?

Status
Not open for further replies.

bluedollar

Programmer
Joined
Jul 24, 2003
Messages
174
Location
GB
I have a peice of code that displays a timetable for a conference:

======================================================

function listtimetable() {

//echo'<table border=&quot;0&quot;>';
echo'<dl>';
$currentdate='0000-00-00';

foreach ($this->idorder as $val) {
#Find values from timetable
$SQL = &quot;select startdate from timetable where timetable_id = '$val'&quot;;
$start = $this->obconnect->selectcol($SQL,&quot;startdate&quot;);
$SQL = &quot;select enddate from timetable where timetable_id = '$val'&quot;;
$end = $this->obconnect->selectcol($SQL,&quot;enddate&quot;);
$SQL = &quot;select title from timetable where timetable_id = '$val'&quot;;
$title = $this->obconnect->selectcol($SQL,&quot;title&quot;);
$SQL = &quot;select speaker_id from timetable where timetable_id = '$val'&quot;;
$speaker = $this->obconnect->selectcol($SQL,&quot;speaker_id&quot;);

#format dates and times
$temp = explode (&quot; &quot;,$start);
$temp1d = explode (&quot;:&quot;,$temp[1]);
$temp2 = explode(&quot; &quot;,$end);
$temp2d = explode (&quot;:&quot;,$temp2[1]);
$date = $temp[0];
$time1 = ''.$temp1d[0].':'.$temp1d[2].'';
$time2 = ''.$temp2d[0].':'.$temp2d[2].'';

#Display date
if ($currentdate != $date) {
$etime = explode (&quot;-&quot;,$date);
$ttime = mktime(0,0,0,$etime[1],$etime[2],$etime[0]);
$ddate = date(&quot;l, n, M, Y&quot;, $ttime);
echo'<dt><b>'.$ddate.'</b></dt>';
}
#Display time
if ($speaker==&quot;&quot;) {
echo'<dd>'.$time1.'-'.$time2.' '.$title.'</dd>';
}
else {
echo'<dd>'.$time1.'-'.$time2.' <A href=&quot;&quot;>'.$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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top