[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

passing form values to cfhttp request as comma delimited

Posted on 2009-05-06
3
Medium Priority
?
407 Views
Last Modified: 2013-12-24
hi experts. too much beer and my lost mind. i have a form field. a select menu where i can select multiple items. on the click of a button, i want to pass the selected items as a comma delimited list. i am confused, i tried using a loop but it failed:

here is what i tried.
<cfloop list="form.selectusers" index="k">
  <cfhttp url="http://smslane.com/vendorsms/pushsms.aspx?user=abc&password=xyz&msisdn=#k#&sid=WebSMS
&msg=#form.message#&fl=0"></cfhttp>  
</cfloop>
 
but i want to pass something like this:
 
  <cfhttp url="http://smslane.com/vendorsms/pushsms.aspx?user=abc&password=xyz&msisdn=996734673,99374673,7364387483&sid=WebSMS
&msg=#form.message#&fl=0"></cfhttp>  
 
like multiple mobile numbers using comma separation. how can i do that. plea guide me

Open in new window

0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Accepted Solution

by:
duncancumming earned 2000 total points
ID: 24318451
Firstly, you're missing # # in your cfloop, should be:
<cfloop list="#form.selectusers#" index="k">


But, if form.selectusers is a list of multiple items, you don't even need that loop.  Just try:
  <cfhttp url="http://smslane.com/vendorsms/pushsms.aspx?user=abc&password=xyz&msisdn=#form.selectusers#&sid=WebSMS&msg=#form.message#&fl=0"></cfhttp>  



0
 
LVL 39

Expert Comment

by:gdemaria
ID: 24318747
always remember, don't drink and code :)
0
 
LVL 16

Author Closing Comment

by:Gurpreet Singh Randhawa
ID: 31578664
Thanks! Well i realize that Beer affect my brain a lot. :)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
Suggested Courses

656 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