Popgun Posted September 6, 2009 Share Posted September 6, 2009 Been having an issue with trash in trash out: Sessions Working (check) Cookies Working (check) Logged In User Working (check) Authentication and Access Level Working (check) Site Structure Looks Like This: Landing Page (simple email registration) redirects to ==> Login Page redirects to===> Home Page It is at this point I want the end user to start a multi-page process of entering in information using a series of forms on pages but the first page is the disclaimer page, with an electronic signature agreement and etc. So using the navigation menu they click on: start.php Here they have the above mentioned form, which contains a radio button, and 2 text fields (one for initials one for name) a hidden field (user_ID) primary key, hidden field (email) grabbed from session ISSUE: Whenever the form is submitted it creates a unique record in the database not not mapped to the logged in user. Im not sure what I am doing wrong, should I be creating a record set and using the update record behavior (I use dreamweaver CS3) or do I need to be using the INSERT function tied to a unique user. Whatever I try it always seems to create a new record set in the table unassociated with the logged in user. Any information helps. If this was unclear please just go ahead and describe how you ensure a users information in the database remains unique, across multiple pages, using multiple forms with the user logged in, and sessions/cookies active Thanks Link to comment https://forums.phpfreaks.com/topic/173278-insert-or-update-either-way-i-get-trash/ Share on other sites More sharing options...
kratsg Posted September 6, 2009 Share Posted September 6, 2009 If you want to update the current user, use mysql_query("UPDATE....") instead. mysql_query("INSERT...") always inserts a new row (unless there's an error such as how your tables are configured with the unique keys and so forth). Link to comment https://forums.phpfreaks.com/topic/173278-insert-or-update-either-way-i-get-trash/#findComment-913388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.