Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old April 17th, 2004, 06:45 PM
sparkybarkalot sparkybarkalot is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 sparkybarkalot User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sessions with PHP Template Tutorial

Any thoughts on how I might use sessions with the great PHP Template system from the tutorial? I've tried a few things and nothing seems to work. The main problem is that I can't figure out how to call the start_session() function at the top of pages. When i try to use it as a tag replace ('sessionstart' => <?php start_session(); ?> it just gets printed out to the page instead of being run. Any ideas? Thanks from a newbie.

Reply With Quote
  #2  
Old April 17th, 2004, 07:39 PM
Carpmadness Carpmadness is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: The Netherlands
Posts: 139 Carpmadness User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Sessions with PHP Template Tutorial


Reply With Quote
  #3  
Old June 15th, 2004, 10:15 PM
bluephoenix's Avatar
bluephoenix bluephoenix is offline
Levelheaded Curmudgeon
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Syracuse, NY
Posts: 507 bluephoenix User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 13 m 2 sec
Reputation Power: 2
Send a message via AIM to bluephoenix
RE: Sessions with PHP Template Tutorial

why not just start the session prior to calling the template class?

php Code:
Original - php Code
  1. start_session();
  2.  require_once("lib/class.Page.php");
  3.  $p = new Page();
  4.  $p->replace_tags(array(
  5.      "HEADER" => "dat/header.html",
  6.      "BODY" => "dat/main.php",
  7.      "FOOTER" => "dat/footer.html"));
  8.  $p->output();


Personally I haven't tried it, but that's where I'd start.

-Tim

Reply With Quote
  #4  
Old June 16th, 2004, 05:40 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,937 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 1 h 57 m 37 sec
Reputation Power: 3
Orkut
RE: RE: Sessions with PHP Template Tutorial


Quote:
why not just start the session prior to calling the template class?

php Code:
Original - php Code
  1. start_session();
  2.  require_once("lib/class.Page.php");
  3.  $p = new Page();
  4.  $p->replace_tags(array(
  5.      "HEADER" => "dat/header.html",
  6.      "BODY" => "dat/main.php",
  7.      "FOOTER" => "dat/footer.html"));
  8.  $p->output();


Personally I haven't tried it, but that's where I'd start.

-Tim

Session_start(); instead of start_session();

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > Sessions with PHP Template Tutorial


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway