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

Posted on 2005-05-06
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


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:");     (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
    LVL 8

    Accepted Solution

    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

    Cheers for that and sorry about the delay.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
    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…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video discusses moving either the default database or any database to a new volume.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now