New topic: GET and POST
<http://forums.realsoftware.com/viewtopic.php?t=43910> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message tigme Post subject: GET and POSTPosted: Mon May 07, 2012 9:12 am Joined: Wed Aug 25, 2010 4:04 am Posts: 12 Location: South Africa Good day everyone. I'm new to the Web Edition. I would like to know how do you read GET and POST values? 1. Through GET the URL might look like http://127.0.0.1:8080/?a=1&b=2 How do I read a and b inside the App? 2. POST is different in that it is not available as a parameters in the URL. How do I read variables ie. POSTED by a Form (External HTML Form)? Thanks _________________ Rudolph Thomas TIGME.COM Top Akiland Post subject: Re: GET and POSTPosted: Mon May 07, 2012 1:52 pm Joined: Tue Jan 04, 2011 3:02 am Posts: 738 Location: Jönköping, Sweden tigme wrote:1. Through GET the URL might look like http://127.0.0.1:8080/?a=1&b=2 How do I read a and b inside the App? Use URLParameter: http://docs.realsoftware.com/index.php/Session.URLParameter There might be an example in the examples folder _________________ Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.7 Using Subversion on a Synology DS409+ REAL.Studio Web Edition 2011r3 Top tigme Post subject: Re: GET and POSTPosted: Mon May 07, 2012 11:57 pm Joined: Wed Aug 25, 2010 4:04 am Posts: 12 Location: South Africa Thanks Akiland Based on your suggestion I was able to find more posts. Could not find any example though. So here is a few for anyone else wanting to know... There seems to be 4 things you can check through Session: http://127.0.0.1:8080/?a=1&b=3&c=66&d=somestring tfName.Text = Session.URLParameterName(3) 'GET Parameter Nr. 4 - Would return "d" tfCount.Text = Str(Session.URLParameterCount()) 'Counts the parameters - Would return 4 tfValue.Text = Session.URLParameter("d") 'Returns value of parameter d - Would return "somestring" bExist = Session.URLParameterExists("d") 'Would return TRUE _________________ Rudolph Thomas TIGME.COM Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
