close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Insert record session variable error

Thread began 8/30/2010 12:13 am by ochalr413916 | Last modified 8/31/2010 10:36 am by Jason Byrnes | 898 views | 9 replies |

ochalr413916

Insert record session variable error

I used the data assist insert record function and I am able to upload to database. However, when I then use the session variable created by the insert record on another form (different page) it does not transfer the previously entered value, rather it places a "0". I only have one field in the database that I am using the insert record behavior. Any advice would be great. Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

on the page you are using the session, add the following at the top:

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

ochalr413916

still not working

I pasted the php code you suggested and I still get a "0" in the text field. However, if I place MM_Username session variable in the text field I do get the correct user. The MM_Username var is being generated on another page (pg1). The session variable that I am having problems with is being generated on pg2 (this is being done through the dataassist insert record) I can get the MM_Username to display on pg3 but not the session variable that I am generating on page 2.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your pages in a zip archive so I can see the code.

Sign in to reply to this post

ochalr413916

Attached zips

Attached Files
COA_pre test.zip
patientHome.zip
Sign in to reply to this post

Jason ByrnesWebAssist

It looks like you are setting the value for the ID column manually.

you should be doing this.


the id column of the table should be set to be an Auto Number column so that the mysql engine can handle assigning it's value.

Sign in to reply to this post

ochalr413916

The id value is the name of my form text field that I'm inserting into table.
That is the only field in the table.
It is manually written because it is a form that asks for that information. I just want to display it on the next page, as it is being written to table in mysql.

Sign in to reply to this post

Jason ByrnesWebAssist

you should have an id column that is an auto number column, then a second column for the data to be entered to.


The proper way to create a database table is to create an auto number field for the Primary Key column


user entered data should not go into the primary key column for the table.

Sign in to reply to this post

ochalr413916

Thank you. That was the problem.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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...