Jump to content

Newbie - PHP, Smarty Template, mySQL - how to keep connection when changing page


fossle

Recommended Posts

Hello,

 

I've inherited a project I need to complete (and am brand new to all of this). 

 

Currently, the web site is designed to pull information from a mySQL database using PHP and then put it into a Smarty template.

 

The first page is working correctly now (I did not design this page).  Using PHP and mySQL the fields are appearing correctly in a Smarty template. 

 

Now, I need to add a new page (that will appear in the same window).  When I link to the new page, the information from the database that was appearing on the first page is no longer appearing on the second page.  How do I keep the same session and connection to the database when I change pages?

 

Here is what I have for the second page (I know I am missing something really important):

 

<?php

session_start();

 

include_once('../../config.php');

include_once('player.class.php');

 

$t->display('videopage.tpl');

 

 

?>

 

Thank you,

Kim

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.