Skip to main content
April 11, 2007
Question

Insert and then update on next page

  • April 11, 2007
  • 2 replies
  • 384 views
I've made a registration page and I want the following page to display the newly registered account in text boxes so the user is able to check the information and edit it then update their newly made registration. Essentially the form needs to go two ways, to the update page first and then to the next page with all the newly added information. At present I have userID as an invisible primary key, it's important that the user doesn't see this (I don't know how relevant that is to my task).

At the moment i've managed to get the update page to recognise the name from the previous page and display relevant details OR managed to add a newly registered user to the database but not both :(

Please help,

Thanks 😄
This topic has been closed for replies.

2 replies

Participant
April 12, 2007
Once the record has been inserted for the first form, within the same form you can write a sql statement to retrieve the inserted values, save them in a session and redirect to the update page.

Hope this helps
Inspiring
April 11, 2007
When you are done with the add, use Server.Transfer instead of
Response.Redirect to go to the update page.


"slowpoke115" <webforumsuser@macromedia.com> wrote in message
news:evjk97$qrs$1@forums.macromedia.com...
> I've made a registration page and I want the following page to display the
> newly registered account in text boxes so the user is able to check the
> information and edit it then update their newly made registration.
> Essentially
> the form needs to go two ways, to the update page first and then to the
> next
> page with all the newly added information. At present I have userID as an
> invisible primary key, it's important that the user doesn't see this (I
> don't
> know how relevant that is to my task).
>
> At the moment i've managed to get the update page to recognise the name
> from
> the previous page and display relevant details OR managed to add a newly
> registered user to the database but not both :(
>
> Please help,
>
> Thanks :D
>


April 11, 2007
Can you explain this a little more? I'm pretty new to PHP and my coding is pretty dependant on the gui at this stage too. Thanks anyway! Also, thanks for replying so amazingly quickly!
April 12, 2007
At present I dont have server,transfer or the redirect command in my code. At present the form goes to review.php once the form has been completed but the information is not sent. Heres the relevant bit of code, I'm still very confused as to what I need to do to make this work, I'd of thought sending the form in two directions using jscript might of worked but it didnt. Heres the code I've got doing the after completion go to bit:

$insertGoTo = "Review.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];

I'll paste more of people need me to. I really do need help with this, my trials running out, lol!