473,379 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Request.Querystring

347 100+
I have a site that uses ASP and am trying to set up a feature where someone can add mp3 files to a list to email the list to someone through a form, i am having a problem getting more than 1 mp3 to list on the page, i thought that by using a Request.Querysting using a variable that stores the id numbers of all the mp3 you want to send and then adding that to the url it would work

code like this

Expand|Select|Wrap|Line Numbers
  1. shortlist.asp?mp3id=firstid,secondid,thirdid
this does not seem to work, i think it can be done with PHP but do not know how.

The idea is that i click a button next to the mp3 file listed to add it to a shortlist, then goto the shortlist page and email a link to the page with all the mp3 files selected relisted.

the website in question is www.yaketyyak.co.uk

there is a similar thing using php at www.anothertongue.com

Any help please
Sep 24 '08 #1
4 1806
DrBunchman
979 Expert 512MB
Hi colinod,

So what's the actual problem? Which bit of your code isn't working? Are you unable to retrieve the values correctly from the QueryString?

Dr B
Sep 26 '08 #2
colinod
347 100+
sorry for the delay, each mp3 file has an id number but when i load a page asking for the mp3 id numbers i am not sure how to code the link so that various numbers can be assigned to the field that contains the mp3 id so that i can call them in on another page
Oct 31 '08 #3
Not sure exactly what you are after here, but hopefully this will help. Using your code snippet from the OP:

Expand|Select|Wrap|Line Numbers
  1. shortlist.asp?mp3id=firstid,secondid,thirdid
  2.  
In the shortlist.asp script you would just need to process the variables like so:

Expand|Select|Wrap|Line Numbers
  1. '''Assign GET variable
  2. str_mp3 = Request.QueryString("mp3id")
  3. '''Process str_mp3
  4. str_mp3Proc = Split(str_mp3,",")
  5.  
This will create an array str_mp3Proc. You can then loop through the array to create your list.

-Best Regards,
Jenkins
Nov 1 '08 #4
colinod
347 100+
Hi Thanks for the info i think this is what i am looking for, would i loop through this the same way as any other loop in ASP

Expand|Select|Wrap|Line Numbers
  1. Do Until(str_mp3Proc.EOF)
  2. If Not str_mp3Proc.EOF Then
  3. response.write "yaketyRecordset("mp3id")"
  4. str_mp3Proc.MoveNext
  5. End If
Not sure how to loop this if above is not correct, i am not very good with asp looping!!!
I gather when i get this to work it will return a list of the info held in the mp3id field seperated by the commas
Nov 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: momo | last post by:
Hello Newsgroup, I want to pass a Request.Form variable to an ASP form, through the url for example lets say i have a form with a textfiled called "txtName" if i click the submit button for...
4
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered...
5
by: Ivan | last post by:
hi, I saw some program using "request("fieldname") " instead of "request.QueryString" to get the value from URL, what's the different ?? thanks
0
by: Anders Borum | last post by:
Hello! I would like to request a new method on the XsltArgumentList class, allowing developers to check the presense of a key/value pair. If you try to add a key/value pair that has already been...
1
by: FD | last post by:
For performance reason, the follwoing code (C#) to capture all the Request collection contexts is NOT recommended: string ID = Request.QueryString; But how to Capture the individual Request...
4
by: Steve | last post by:
Hi- I'd like to set values in the QueryString if I detect that a user submits a bad value, say... ?id=333 where there is no id '333', I would like to set it to '0' for example. I tried to use...
2
by: mahsa | last post by:
Hi have have some link like thi http://x.com/Shoppingcart.aspx?pn=ps50210&qty_ps50210=1&pn=excel&qty_excel=1&pn=l4504000&qty_l4504000=1&sku=PS50210&cat=laminate&action=updat now I want to request...
4
by: Guoqi Zheng | last post by:
On my application, I need to have different action based on the pass in query string. When the query string is not presented, I try to use If request.querystring("id") ="" THEN ...... This is...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.