[ciapug] Moving on, more questions.. How to pass variable values in a Session

Jane Swanson ciapug@cialug.org
Thu, 26 Jun 2003 15:44:54 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0085_01C33BF9.E39B5810
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm hoping I can move on to my next question.  No answer yet from my =
Hosting Co @ passing session values without getting warning messages -- =
IE, their header + <? session_start() ?> -- on the same line does not =
send values; while their header on firstline and <? session_start() ?>  =
on the next does send values but sends warnings.

Since I can @ away the warning messages and get values, I'm trying to =
proceed. =20

My question:  I have a list on my second page of people names and =
general information from my mySQL database.  I would like to link to a =
detail php page and pass the ID value for that individual.  How do I set =
the $searchID when they select a name?

I tried
   echo '<form action=3D"../../cgi-bin/pandetail.php" method=3D"post">';
   $searchID =3D mysql_result($result,$i,"p.id");                // $i =
is the row number
   echo ','.$searchID.' ';
   echo '<input type=3D"submit" value=3D"go">';
   echo '</form>';

and  $searchID came to the pandetailphp as the last value on the =
original form. I expected that.  My book says the last value will be =
used. =20

But, how do I send/propagate the value for the row chosen?

JBS
------=_NextPart_000_0085_01C33BF9.E39B5810
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I'm hoping I can move on to my next =
question.&nbsp;=20
No answer yet from my Hosting Co @ passing session values without =
getting=20
warning messages -- IE, their header + &lt;? session_start() ?&gt; -- on =
the=20
same line does not send values; while their header on firstline and =
&lt;?=20
session_start() ?&gt;&nbsp; on the next does send values but sends=20
warnings.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Since I can @ away the warning messages =
and get=20
values, I'm trying to proceed.&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My question:&nbsp; I have a list on my =
second page=20
of people names&nbsp;and general information from my mySQL =
database.&nbsp; I=20
would like to link to a detail php page and pass the ID value for that=20
individual.&nbsp; How do I set the $searchID when they select a=20
name?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp; echo '&lt;form=20
action=3D"../../cgi-bin/pandetail.php"=20
method=3D"post"&gt;';<BR>&nbsp;&nbsp;&nbsp;$searchID =3D=20
mysql_result($result,$i,"p.id");&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;$i is the row=20
number<BR>&nbsp;&nbsp;&nbsp;echo ','.$searchID.' =
';<BR>&nbsp;&nbsp;&nbsp;echo=20
'&lt;input type=3D"submit" value=3D"go"&gt;';<BR>&nbsp;&nbsp;&nbsp;echo=20
'&lt;/form&gt;';</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and&nbsp; $searchID came to the =
pandetailphp as the=20
last value on the original form. I expected that.&nbsp; My book says the =
last=20
value will be used.&nbsp; </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But, how do I send/propagate the value =
for the row=20
chosen?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>JBS</FONT></DIV></BODY></HTML>

------=_NextPart_000_0085_01C33BF9.E39B5810--