close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Session Values not being triggered

Thread began 9/26/2010 8:04 am by bjgarner241692 | Last modified 12/27/2010 10:47 am by bjgarner241692 | 3293 views | 18 replies |

bjgarner241692

Session Values not being triggered

I cannot seem to find a trigger to work for my session values. I would like them set on Submit but it is not working.

Page attached.

Attached Files
sequent_noncert_Insert.zip
Sign in to reply to this post

Dave BuchholzBeta Tester

At the top of the page (above any recordsets etc.) you are redirecting to after the database insert

php:
$WA_redirectURL = "sequent_confirm.php";



put this code

php:
<?php

//=Enable Sessions=============

if (!isset($_SESSION)) {
  
session_start();
}
?>



your sessions should then be available to you to use.

Sign in to reply to this post

bjgarner241692

Sorry, put it where?
I placed it just before my Session setup,directly after the include files at the top of the page.

Sign in to reply to this post

Dave BuchholzBeta Tester

I would normally place it above the database connection file i.e.

php:
<?php 

//=Enable Sessions============= 

if (!isset($_SESSION)) { 
  
session_start(); 

?>
<?php 
require_once('Connections/connDB.php'); ?>
Sign in to reply to this post

bjgarner241692

Still no luck.
Frustrating, this works fine with ASP.

Sign in to reply to this post

Dave BuchholzBeta Tester

You need to move the code that is creating the sessions as well and put it just below the code I gave you i.e.

php:
<?php  

//=Enable Sessions=============  

if (!isset($_SESSION)) {  
  
session_start();  
}  
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["Insert_x"]))     {
  
$_SESSION["Installer"] = "".((isset($_POST["wInstaller"]))?$_POST["wInstaller"]:"")  ."";
}
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["Insert_x"]))     {
  
$_SESSION["Email"] = "".((isset($_POST["wInstEmail"]))?$_POST["wInstEmail"]:"")  ."";
}
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["Insert_x"]))     {
  
$_SESSION["City"] = "".((isset($_POST["wInstCity"]))?$_POST["wInstCity"]:"")  ."";
}
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["Insert_x"]))     {
  
$_SESSION["Type"] = "".((isset($_POST["wStyle"]))?$_POST["wStyle"]:"")  ."";
}
?>
<?php
if (!session_id()) session_start();
if(isset(
$_POST["Insert_x"]))     {
  
$_SESSION["Owner"] = "".((isset($_POST["wOwner"]))?$_POST["wOwner"]:"")  ."";
}
?>
Sign in to reply to this post

Jason ByrnesWebAssist

you will also need the session start code on the page that is using the sessions.


on any page that you want to display session data, put this code at line 1:

php:
<?php if (!session_id()) session_start();  ?>
Sign in to reply to this post

bjgarner241692

I am still unable to do this.
With the above code in place here is what I get:


Warning: Cannot modify header information - headers already sent by (output started at ________________\sequent_noncert_Insert.php:2) in ________________\sequent_noncert_Insert.php on line 68

Sign in to reply to this post

Jason ByrnesWebAssist

this means that there is out put to the page around line 2:
sequent_noncert_Insert.php:2


if you need help finding the problem, please send a copy of the page in a zip archive.

Sign in to reply to this post

bjgarner241692

file attached, thanks

Attached Files
sequent_cert_Insert.zip
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...