Print Page | Close Window

Passing a variable

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1706
Printed Date: 29 March 2026 at 8:40am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Passing a variable
Posted By: firestorm
Subject: Passing a variable
Date Posted: 09 April 2003 at 1:22am

Hi there

I followed the tutorial on the guestbook very closely, basically just adding a field in the DB to suit my needs.  My problem comes with the delete routine.  The file where i choose the record i want to delete works fine, but when i pass the index number of the record to be deleted to the actual file which does the deleting, i get the page cannot be found.

ie. DBdelete?2 or any other integer give me page cannot be found.

If i hardcode the integer into DBdelete, it deletes the right record.  If I try to run DBdelete, it crashes because i have no supplied it with a number.

Any help would be appreciated.  Thank you for your time.




Replies:
Posted By: dj air
Date Posted: 09 April 2003 at 6:48am

are you sending it in a querystring ..

because DBdelete?2 needs to be something like DBdelete?ID=2

notice the red section .. you are missing .. it might not be ID it might be something else ..... i think thats the problem



Posted By: firestorm
Date Posted: 09 April 2003 at 12:17pm

Yes, you are right.  That is exactly what the url is.  It is DBdelete?ID=2.  I entered it wrong in my initial post.  If anyone would like to see what happens, the files in question are

http://68.144.208.71/DBdeletechoice.asp - http://68.144.208.71/DBdeletechoice.asp

which passes to

http://68.144.208.71/DBdelete.asp - http://68.144.208.71/DBdelete.asp

 

Thanks for your reply.



Posted By: glypher
Date Posted: 09 April 2003 at 12:23pm

you're passing it to DBdelete

it should be DBdelete.ASP



-------------
glypher said so.

http://www.gainesvillebands.com - GainesvilleBands.com


Posted By: firestorm
Date Posted: 09 April 2003 at 1:24pm
Woohoo!!  It works.  Thankyou very much for your help.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net