Aha! now I am starting to understand the utility of that data.sqlite file!
Thanks again, Simon, and I will look for a PHP forum. Do you know a good
one?

Frank L.


Simon Slavin-3 wrote:
> 
> 
> On 15 Dec 2009, at 8:24am, FrankLane wrote:
> 
>> In page 1 I have defined:
>> 
>>  $dbHandle = new PDO('sqlite:data.sqlite');
>> 
>>  $var='hello';
>> 
>> I can pass a $var variable to page 2 using using the URL as in
>> 
>>  echo " page2.php?var=$var  GO TO PAGE 2  ";
> 
> Instead do this:
> 
> echo " page2.php?var=".$var;          // GO TO PAGE 2
> 
>> and I want to execute an sqlite/PHP command in page 2 like:
>> 
>>  $var=$_GET(var);
>>  $sth = $dbHandle->query("select * from table where ID0='$var'");
>> 
>> But I cannot figure out how to get the $dbHandle to page 2. Can anyone
>> help?
> 
> You can't pass anything (apart from text in a COOKIE) from one page to
> another.  You have to open the database again on the second page by
> repeating your line
> 
> $dbHandle = new PDO('sqlite:data.sqlite');
> 
> on the second page.
> 
> You have now moved from asking questions about SQLite to asking questions
> about PHP, and it might make more sense to find a forum about PHP to ask
> your questions rather than one about SQLite.
> 
> Simon.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Passing-a-%24dbHandle-to-a-new-page-tp26791268p26793164.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to