close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Changing the return URL when deleting a record

Thread began 5/04/2013 10:02 am by iainmacdonald331081 | Last modified 5/04/2013 10:46 am by iainmacdonald331081 | 236 views | 2 replies |


Changing the Redirect URL when deleting a record

I have an example which is slightly different to the regular situation, where a record would be deleted, and return to the the same page that lists the results.

The page I have is a details page, but the delete button is deleting a record in a joined table. The deletion is working, but I can't get it to redirect to the URL with the Itinerary ID.

So, for example, if the URL is:

I have a look up table that pulls through Lodges that are part of the Itinerary. So I'm trying to get it to:

1. Delete a Lodge associated with the itinerary.
2. Return to the URL for the Itinerary.

By default the redirect URL line is:

$WA_redirectURL = "index_lodge5.php?ItineraryID=".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"") ."";

But the DeleteRecordID is the LodgeID, not the ItineraryID.

So I've been trying to change it, I would have thought it should be something like:

$WA_redirectURL = "index_lodge5.php?ItineraryID=".$row_WADAItinerary_Lodges['ItineraryID'] ."";

But it keeps redirecting to:

rather than

Hope that makes sense - I'm sure this must be something simple enough, but I can't for the life of me get it.

I've attached a copy of the page for reference.


Attached Files
Sign in to reply to this post

CraigRBeta Tester

Try storing the itineraryid from the recordset in a hidden field in your form,

then use the post value of the field in the redirect

"index_lodge5.php?ItineraryID=".((isset($_POST["hidden field"]))?$_POST["hidden field"]:"")

Sign in to reply to this post


Thank you so much Craig - its a few hours since I started looking at this, and had I thought got done the harder parts, ie adding my lookup table, the little form to add a lodge, with a drop down looking up all the lodges, adding the associated lodges to the itinerary page, and getting it to delete the right thing. But I couldn't for the life of me get that Redirect URL changed.

But that all looks like its working now with the hidden field:

<input type="hidden" name="hiddenfield" id="hiddenfield" value="<?php echo($_GET['ItineraryID']); ?>" />

And the Redirect line changed to:

$WA_redirectURL = "index_lodge4.php?ItineraryID=".((isset($_POST["hiddenfield"]))?$_POST["hiddenfield"]:"");

Sign in to reply to this post

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





Ease of use


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