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

multiple postings by one user

Thread began 6/02/2009 12:32 pm by roby258376 | Last modified 6/10/2009 8:41 pm by roby258376 | 4097 views | 27 replies |

roby258376

multiple postings by one user

Hi folks,

I am trying to use DataAssist to manipulate a job listing database for a client of mine.

I have the database created, but I need to be able to allow users who have entered jobs to edit only the jobs they posted.

I ran DataAssist and created the usual pages, Insert, Update, Search, Results and Delete. Insert works perfectly but I cannot get Search and Results to work as I need them to.

What is the best way to edit things so that a user only sees their own postings?

Thanks in advance

Sign in to reply to this post

Ray BorduinWebAssist

Have the user log in and store the associated userID as a session variable.

Make sure to store that userId as part of their insert and that way you can filter the recordset by the userid session variable so that they only have access to their own records.

Sign in to reply to this post

roby258376

thanks Ray, I'll try that

Sign in to reply to this post

roby258376

When I try to edit the record set on the Results page, to specifiy comparing member_id in the jobs database with the session variable, I get an error message saying "Making this change would require changing code that is locked by a template or a translator. The change will be discarded.

The page was generated with dataassist. How do I edit it?

thanks

Sign in to reply to this post

Ray BorduinWebAssist

Do you have the most recent version from your order history? This is a bug introduced in cs4. I think if you contact support or maybe just download the most recent version available you can fix the problem.

(you can also just adjust the recordset query in code view)

Sign in to reply to this post

roby258376

thanks Ray,

I do have the most recent version, but I am removing it and reinstalling it, just in case my last install got bugged by my not removing the previous one first. UPDATE ok tried, that, didn't help. Still getting the error message

I am not entirely sure how to edit my code by hand, so I haven't tried that. However, I have to have this fixed by end of today, so what is the best way to contact support for an emergency fix if I can't get it fixed myself? or is that not possible?

Sign in to reply to this post

Ray BorduinWebAssist

A support incident is the best way. They may not get you an emergency fix, but they can help you with a work-around.

What are you trying to edit? Maybe I can help walk you through how to do it by hand.

Sign in to reply to this post

roby258376

I ran DataAssist and created the usual pages. Insert, Delete, Update, Search, Results.

I need the search page to only return results for jobs inserted by the user who is logged in and doing the search, as opposed to bringing up all jobs listed.

So, per your instruction, I added a hidden form field to the insert.php that inserts the session variable MM_UserID into the member_id field of the jobs table.

The property inspector shows: hiddenUserID Value <?php echo $_SESSION['MM_UserID']; ?>

So far, so good, I insert a new job and the job listing table shows the member_ID correctly.

Now, I am trying to edit the results page record set (WADAjobs) with WHERE member_id = 'colname' and I'm defining a variable colname as integer, default value -1, $_SESSION['MM_UserID']

When I do this, I get the error message and no update is done to the page. So when a user logs in to edit their job listing and does a search, they are getting access to all jobs, not just their own.

Any help you can give Ray is appreciated. I know the support guys are swamped and my tickets often don't get answered for several days.

Sign in to reply to this post

meister281653

Hi,

if i understand it right, you dont want other users to edit the other users posts?

OK, i do it with 2 things. first, the userID of the logged in User. store it in a session. its easy with security assist.

then, to make sure no one can change the postID create a hush, so i call it.

so you got a recordset of all the posts a user posted.

userID=1
postID=3
postID=5
postID=8

so, normaly you link: ......showpost.php?postID=8

but then it doesent work with dataassist, cause there is only one where possible.

so you need 2 parameters.

......showpost.php?postID=8&SEC=456456456456456456456456456

so, you got the postID and the userID this will create the SEC

$SEC=SHA1(postID.userID)

in the showpost.php page, just check if the posted SEC is the SHA1 of the posted postID and the in session stored userID.

if so, you can use the postID.

And use that in Dataassist.



I hope you understand what I want to say ;-)

Denis

Sign in to reply to this post

roby258376

Thanks for your reply Denis.

I read through your solution and unfortunately, I don't have enough knowledge to understand all that you were explaining.

Hopefully, Ray will have a simple solution.

thanks

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