close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Delete button on details page isn't deleting

Thread began 5/30/2021 6:17 am by Mags | Last modified 6/02/2021 10:19 am by Ray Borduin | 319 views | 5 replies |

Mags

Delete button on details page isn't deleting

Hi Ray, I'm in the process of amalgamating three sites into one on a new domain and moving over a load of DA pages. Most of this has been fairly straightforward but I've found one detail page where the delete behavior isn't working.

I tried removing and re-adding it, and also went as far as recreating a set of DA pages so that I could lift the raw delete behavior code from the new page to make sure the syntax was correct, but no luck. Would you mind taking a look at the page for me? No error message given either, it just doesn't delete.

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it would work to me. Does the delete popup open and button appear to work? I'd probably have to debug this live with a url and ftp information.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Yes, the popup appears and it redirects back to the results page, but just doesn't delete the record. Details are in the PM.

Sign in to reply to this post

Ray BorduinWebAssist

The issue is in your select statement... you have:

SELECT CPD.CPD_ID, para_users.CPD_ID, ...

You are selecting two columns name CPD_ID. The second one overwrites the first, so the recordset returns the CPD_ID from the users table and that record doesn't match the CPD table when it goes to delete.

I don't think you are using the CPD_ID from the users table on that page, so I think you can just remove it and make your recordset:

SELECT CPD.CPD_ID, Course_name, ...

That should make it return the correct ID and the delete would work.

Sign in to reply to this post
Did this help? Tips are appreciated...

Mags

Yes, that's what the problem was! Working now.

On another, purely cosmetic note, I have an htaccess rule set up so that I can dispense with the .php file extensions. When logging in though, I find that the .php extension is added back automatically to the page the user is redirected to. Is there any way to change this? So for example, user clicks link to protected page:

www.mysite.co.uk/members --> redirected to www.mysite.co.uk/login --> is then redirected to www.mysite.co.uk/members.php. I want them to be taken to www.mysite.co.uk/members instead.

Not a big deal, but Google Analytics does then view these as separate pages i.e. members and members.php

Sign in to reply to this post

Ray BorduinWebAssist

It should redirect back to the url used to access the page in the first place. The code uses: $_SERVER['REQUEST_URI'] as the return page redirect.

Maybe you have it set to members.php on the login page? In that case you may be able to find and replace the reference there.

Sign in to reply to this post
Did this help? Tips are appreciated...

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