My redirect page specified in my Update Record is overlooked....

Posted on 2005-05-06
Medium Priority
Last Modified: 2010-04-25
Firstly, sorry about the mingy 45 points but that's all I have left...

Anway, this relates to a question I posted earlier, trying to work out how to access a specific recordset (to update it via an update page) from a database by entering an email address and password. I've managed this to an extend, through the following method;

I created a simple form with 2 text areas.

One textfield called PasswordID and the other textfield called contactID

The form action specified in the property inspector goes to Update.php

In Update.php I created a another form, and in it, textfields corresponding to the values I would want the user to be able to edit.

I then created a recordset (Bindings, +, Recordset(query).

I selected the ADVANCED recordset view and entered the following SQL

FROM TestTable
WHERE password = 'colname' AND contactmail = 'colnames'

Under variables I entered the following:

Name Default Value Run-time Value
colname 1 $_POST['passwordID']
colnames 1 $_POST['contactID']

Now in order to ensure that anyone who entered incorrect password and email details gets directed to another page I put in this line

header("Location: http://www.example.com/rejected.php");

just before the php code ended.

So, this worked and if the user entered the correct email and password details they would be forwarded through to my update page. However, after making the updates, and pressing the update button,  the user was then directed to :

("Location: http://www.example.com/rejected.php");     (THANKS HAVIN_IT!)

and not the page I had specified in the Update Record Set, using the UPdate Recordset behaviour

So without overwriting this functionality which sends any user to the rejected screen if they enter the wrong login details, how can I send them to the page I specified in the update recordset page after they update???

Any help, as always, would be greatly appreciated...

Question by:ayounis

Accepted Solution

alexhogan earned 180 total points
ID: 13972019
You will have to re-query the database for their records.

Once they made the update then they no longer matched what was in the database.  So after the update you'll have to query the database using the logon information that you have on the individual so you can send them to the correct page.

Author Comment

ID: 14007310
Cheers for that and sorry about the delay.


Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question