Skip to main content
Inspiring
September 16, 2008
Question

session variable

  • September 16, 2008
  • 3 replies
  • 359 views
Hey there i am trying to get a recordset to return based on the ID of another table and recordset
that is

$_SESSION[gardenpiclist] = '<?php echo $row_selectedgardenpic['siteid']; ?>';

then

$query_gardenpiclist = "SELECT * FROM siteimage WHERE siteimage.siteid = "$_SESSION[gardenpiclist]"";

and getting this error

Parse error: syntax error, unexpected T_STRING in /home/backyard/public_html/My Canvas/individualgardenimagedisplay.php on line 315

or i am better off trying to use a join query?
any help?
thanks
This topic has been closed for replies.

3 replies

Participant
September 23, 2008
Very helpfull thanks!

Had almost the same problem.













http://www.meerbezoekerskrijgen.nl webdirectory
Inspiring
September 18, 2008
Murray,

Thanks for that but am still getting


Parse error: syntax error, unexpected T_STRING in /home/backyard/public_html/My Canvas/individualgardenimagedisplay.php on line 309

How do I insert the code and where? I can email the page to you if that is easier?

Thanks
Inspiring
September 16, 2008
$_SESSION['gardenpiclist'] = '<?php echo $row_selectedgardenpic['siteid'];
?>';

$query_gardenpiclist = "SELECT * FROM siteimage WHERE siteimage.siteid =
" . $_SESSION['gardenpiclist'];

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Prellyan Luxtintner" <webforumsuser@macromedia.com> wrote in message
news:gaolej$q3d$1@forums.macromedia.com...
> Hey there i am trying to get a recordset to return based on the ID of
> another
> table and recordset
> that is
>
> $_SESSION[gardenpiclist] = '<?php echo $row_selectedgardenpic['siteid'];
> ?>';
>
> then
>
> $query_gardenpiclist = "SELECT * FROM siteimage WHERE siteimage.siteid =
> "$_SESSION[gardenpiclist]"";
>
> and getting this error
>
> Parse error: syntax error, unexpected T_STRING in
> /home/backyard/public_html/My Canvas/individualgardenimagedisplay.php on
> line
> 315
>
> or i am better off trying to use a join query?
> any help?
> thanks
>