Conflicting... beyond me

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 4, 2010   (RSS)

Re: [Toledoh] Conflicting... beyond me

By Jason - May 31, 2010

Hi Tim,

There are a couple of things here. The first thing that's happening is that your starting a session at the very top of your page. But further down the page you're including the "viewer_functions.php" file, which calls another file, which starts a session. This is what's causing the conflict.
What I would suggest doing is move your line that adds "viewer_functions.php" up to the very top of the file. You can then remove the code that starts a session since one will already have been created.

The other errors your seeing are due to undefined variables. These variables (like $css and $_SESSION['post']['name']) are only being set under certain conditions. Therefore, with every execution of the page, you cannot guarantee that these variables have been defined. We can get around this by add an "@" symbol in front of your variables like this:

<?=@$css?>

or

<td width="70%"><input type="text" class="validate[required]" name="name" id="name" value="<?=@$_SESSION['post']['name']?>" /></td>

This will suppress the errors in case those variable haven't been created.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Conflicting... beyond me

By Toledoh - June 4, 2010

Thanks Jason.

I've bypassed that function on the site for the time being - but will go back and visit it once a get a breath! I appreciate your help and will update this thread once I give it a shot.
Cheers,

Tim (toledoh.com.au)