Adding to db and passing value to confirmation page? (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Cookie -> Adding to db and passing value to confirmation page? (9/6/2002 8:22:22)

I am trying to add to a database. This part works fine!

In the confirmation page I am trying to pass a value (siteID) to the confirmation page as well. This is in the URL of the submission page. eg:

www.mysite.com/submit.asp?siteID=3

After submission I need the url to be something like:

www.mysite.com/added.asp?siteid=3

yet in the confirmation field i am putting

submit.asp?siteID=<%=request.querystring(" siteID" )%>

Any ideas?





Spooky -> RE: Adding to db and passing value to confirmation page? (9/6/2002 16:22:37)

How do you get from the page submit.asp to the page added.asp after submitting the record?

Are you using the DRW or ASP?

I would expect a redirect in there somewhere if submit processes the record and then goes to added.

response.redirect " added.asp?siteID=" &request.querystring(" siteID" )




Cookie -> RE: Adding to db and passing value to confirmation page? (9/7/2002 4:11:39)

Spooky,

I am just using the FP form posting feature (see image)

If there is any other way to do it, I am all ears!!

Cheers!

[image]http://www.frontpagewebmaster.com/upfiles/4573/Nl29236.gif[/image]




Cookie -> RE: RE: Adding to db and passing value to confirmation page? (9/10/2002 4:18:29)

Does anyone know of any other way of updating a db other than the way used above?

As I need to redirect whilst passing values, and the avove does not allow this!

Thanks




hhammash -> RE: Adding to db and passing value to confirmation page? (9/10/2002 6:26:47)

Hi,

I think I can help you, but frankly you need to be more clear in your post.

Regards
Hisham




Cookie -> RE: RE: Adding to db and passing value to confirmation page? (9/10/2002 6:44:06)

Hi Hisham

Basically, I am creating a Content Management backend system, where they can control a number of sites from 1 backend screen.

So....

There is a DRW on the left picking up all the Sites " Where SiteID = 1" and another 3 DRW for the controls using " Where SiteID = 1" depending on the Site selected to work on.

So, on all pages the URL needs to contain the SiteID to return the correct URL for the Controls. Everything else works eg. Deleting and updating entries, by posting to a DRW using the UPDATE or DELETE query, and at the same time posting it using the following URL:

updateProducts.asp?siteID=<%=FP_FieldVal(fp_rs," siteID" )%>

What I need to be able to accomplish is pass the SiteID to the confirmation page of the addproduct.asp. I am currently using the FP form wizard to update the db as shown in the screenshot. Is there another way to do this?

Hope this explains it a bit better!





hhammash -> RE: Adding to db and passing value to confirmation page? (9/10/2002 7:25:17)

Hi,

When you post to Update.asp and finished, which page is the Confirmation page. Did you creat one or it is the DRW default page that says " Record has been updated" ?

What do you want to show on the confirmation page?

Regards
Hisham




Cookie -> RE: Adding to db and passing value to confirmation page? (9/10/2002 8:13:17)

It is Just the " Record has been updated"

I am quite happy for the " add" to read " Record has been updated" as well!




hhammash -> RE: Adding to db and passing value to confirmation page? (9/10/2002 8:23:04)

Hi,

OK now I am getting closer.

After yo update the files, you get this message fo the DRW saying the record has been updated.

From this page you want to move to another confirmation page that has the Information entered in the Update Form, right?

Hisham




Cookie -> RE: Adding to db and passing value to confirmation page? (9/10/2002 8:25:17)

No,

It can just say " Record updated" , but as this page has a menu on the left dependent on the " SiteID" value being in the URL I need the value passed to this page.

The Current way I am doing it (Form Posting direct to the database)does not allow this




hhammash -> RE: Adding to db and passing value to confirmation page? (9/10/2002 10:27:21)

Hi,

If SiteID is a field in your DRW, and it has a hyperlink, and you want the hyperlink to have the parameter of the clicked SiteID record. Your Hyperlink should be like this:

SiteID.asp?SiteID=<%=FP_FieldURL(fp_rs," SiteID" )%>

This is what happens which I click the hyperlink in the DRW:
http://www.MyWebSite/AddedRecords.asp?SiteID=3


1- In DRW desing right click the Site ID field
2- Insert Hyperlink
3- Select the Confirmation Page
4- Click Parameters
5- Click Add
6- Select Site ID
7- OK
8- OK
Save the page.

Now when you browse the Database Results, you will see a link on the SiteID field, click it, it will take the site ID number to the Confirmation page.

The above is how to do the link to send parameters properly. But what I don' t understand what is your confirmation page. Is it an ASP page or is it a DRW, is the SiteID a field in the Database, what is the SiteID parameter is going to do.

Please try the above steps, I hope this is what you need, but I am still not clear about the whole matter. Would you please put a test page on the web and post the URL so I can see it much better.

Try this link, click an ID number and look at the next page and look at the Address field of the browser.

http://www.fmhs.uaeu.ac.ae/nml/SitesList.asp

The steps that I put for you will ensure that the SiteID has been taken with the hyperlink. But I don' t know what is it for and what is it supposed to do.

Please post your pages and give me the address, I can see the whole picture, and also I am interested in seeing it.

Best regards
Hisham







Cookie -> RE: Adding to db and passing value to confirmation page? (9/10/2002 12:21:56)

OK,

This seems to be veering off track with what I am trying to achieve!

Look at this article:
http://www.outfront.net/spooky/save_form.htm#save

This lets you save form results into a database.

This is what I am currently doing.

But instead I want to do it like this:
http://www.outfront.net/spooky/update.htm

Using a simple SQL statement like the following:
UPDATE TABLE
SET Field=' ::Field::'
WHERE ID=::ID::

What would the SQL statement for " ADDING" arecord be?

Thanks




Cookie -> RE: Adding to db and passing value to confirmation page? (9/10/2002 12:51:19)

Not to worry!

Found it!!!

INSERT INTO table (firstname, lastname) Values (' ::fname::' , ‘::lname::’)




hhammash -> RE: Adding to db and passing value to confirmation page? (9/13/2002 19:27:24)

Hi cookie,

That was easy. I was diverted into another direction. I thought that you want to send and ID to your confirmation page. This SQL, just adds a new value.

Were you able to send anything to the Confirmation page?

If you want, you could use QueryString function.

Regards
Hisham




Spooky -> RE: Adding to db and passing value to confirmation page? (9/13/2002 21:25:30)

Sorry - missed this thread.
Try the following (word attachment)




Cookie -> RE: Adding to db and passing value to confirmation page? (9/14/2002 4:09:51)

Hisham,

I did want to send a value to the confirmation page , but I couldn' t figure it out, as the confirmation field in the update database field wouldn' t allow <%=request.querystring(" test" )%>

So, I added the record by posting to another asp page that used the INSERT function, and return the value from that.

BUT, now Spooky has posted the word doc, and that explains it perfectly!!!

Thanks Hisham & Spooky for your help!

Dave




hhammash -> RE: Adding to db and passing value to confirmation page? (9/14/2002 6:03:09)

Hi cookie,

You are welcome.

How to use word attachment in your example?


Thanks
Hisham




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
9.301758E-02