SlideShare a Scribd company logo
Ring Documentation, Release 1.2
The Response
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New Page
{
divstart([ :style = styledivcenter("800px","500px") ])
boxstart()
text ( "HTTP GET Response" ) newline()
boxend()
divstart([ :style = stylefloatleft()+stylewidth("10%")+
41.5. HTTP Get Example 260
Ring Documentation, Release 1.2
stylecolor("black")+stylegradient(58) ])
newline()
text ( "Name : " )
newline() newline()
text ( "Address : " )
newline() newline()
text ( "Phone : " )
newline() newline()
text ( "Age : " )
newline() newline()
text ( "City : " )
newline() newline()
text ( "Country : " )
newline() newline()
text ( "Note : " )
newline() newline()
divend()
divstart([ :style = stylefloatleft()+stylewidth("90%")+
stylecolor("black")+stylegradient(47) ])
divstart([ :style = stylefloatleft() + stylewidth("1%") ])
newline()
divend()
divstart([ :style = stylefloatleft() + stylewidth("95%") ])
newline()
text ( aPageVars["Name"] )
newline() newline()
text ( aPageVars["Address"] )
newline() newline()
text ( aPageVars["Phone"] )
newline() newline()
text ( aPageVars["Age"] )
newline() newline()
text ( aPageVars["City"] )
newline() newline()
text (aPageVars["Country"] )
newline() newline()
text ( aPageVars["Notes"] )
newline() newline()
divend()
divend()
divend()
}
Screen Shot:
41.5. HTTP Get Example 261
Ring Documentation, Release 1.2
41.6 HTTP POST Example
The Page User Interface
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New Page
{
boxstart()
text( "Post Test")
newline()
boxend()
divstart([ :style=StyleFloatLeft()+StyleWidth("100px") ])
newline()
text( "Number1 : " ) newline() newline()
text( "Number2 : " ) newline() newline()
divend()
formpost("ex7.ring")
divstart([ :style = styleFloatLeft()+StyleWidth("200px") ])
newline()
textbox([ :name = "Number1" ]) newline() newline()
textbox([ :name = "Number2" ]) newline() newline()
submit([ :value = "Send" ] )
divend()
formend()
}
Screen Shot:
41.6. HTTP POST Example 262
Ring Documentation, Release 1.2
The Response
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New Page
{
boxstart()
text( "Post Result" )
newline()
boxend()
divstart([ :style = styleFloatLeft()+styleWidth("200px") ])
newline()
text( "Number1 : " + aPageVars["Number1"] )
newline() newline()
text( "Number2 : " + aPageVars["Number2"] )
newline() newline()
text( "Sum : " + (0 + aPageVars["Number1"] + aPageVars["Number2"] ) )
newline()
divend()
}
Screen Shot:
41.6. HTTP POST Example 263
Ring Documentation, Release 1.2
41.7 Upload Files
The Page User Interface
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New page
{
boxstart()
text( "Upload File" )
newline()
boxend()
for x = 1 to 3 newline() next
formupload("ex9.ring")
text( "Customer Name : " )
textbox([ :name = "custname" ])
newline() newline()
divstart([ :style = styleFloatLeft() + styleWidth("90px") ])
uploadfile("file") newline() newline()
uploadfile("file2") newline() newline()
submit([ :value = "Send" ])
divend()
formend()
}
Screen Shot:
41.7. Upload Files 264
Ring Documentation, Release 1.2
The Response
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
cUploadPath = "C:/Apache2.2/htdocs/ringapp/upload/"
cUploadFolder = "/ringapp/upload/"
New page
{
boxstart()
text( "Upload Result" )
newline()
boxend()
newline()
divstart([ :style= styleFloatLeft() + styleWidth("100px") ])
text( "Name : " + aPageVars["custname"] )
newline()
divend()
if aPageVars["file"] != char(13)
getuploadedfile(self,"file")
ok
if aPageVars["file2"] != char(13)
getuploadedfile(self,"file2")
ok
}
Func getuploadedfile oObj,cFile
# here we use object.property
# instead of object { } to avoid executing braceend method
cFileName = cUploadPath + oObj.getfilename(aPageVars,cFile)
41.7. Upload Files 265
Ring Documentation, Release 1.2
write(cFileName,aPageVars[cFile])
system("chmod a+x "+cFileName)
oObj.newline()
oObj.text( "File "+cFileName+ " Uploaded ..." )
oObj.newline()
imageURL = cUploadFolder+oObj.getfilename(aPageVars,cFile)
oObj.link([ :url = imageURL, :title = "Download" ])
oObj.newline()
oObj.image( [ :url = imageURL , :alt = :image ] )
oObj.newline()
Screen Shot:
41.7. Upload Files 266
Ring Documentation, Release 1.2
41.8 Cookies
The Page User Interface
#!c:ringbinring.exe -cgi
Load "weblib.ring"
41.8. Cookies 267
Ring Documentation, Release 1.2
Import System.Web
New page
{
boxstart()
text( "Cookie Test" )
newline()
boxend()
newline()
link([ :url = "ex11.ring", :title = "Use Cookies" ])
cookie("custname","Mahmoud Fayed")
cookie("custage",28)
}
Screen Shot:
The Response
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New Page
{
boxstart()
text( "Cookies Values" )
newline()
boxend()
link([ :url = "ex10.ring", :title = "back" ])
newline()
divstart([:style="float:left;width:200px"])
text( "Name : " + aPageVars["custname"] )
newline()
text( "Age : " + aPageVars["custage"] )
newline()
divend()
}
Screen Shot:
41.8. Cookies 268
Ring Documentation, Release 1.2
41.9 URL Encode
The Page User Interface
#!c:ringbinring.exe -cgi
Load "weblib.ring"
Import System.Web
New Page
{
boxstart()
text( "URLEncode" )
newline()
boxend()
link([ :url = "ex5.ring?Name="+URLEncode("-*{Mahmoud}*-")+
"&Address=Egypt&Phone=123456&Age=28&Notes=Programmer",
:title = "Test URL Encode" ])
}
Screen Shot:
Screen Shot:
41.9. URL Encode 269

More Related Content

PDF
The Ring programming language version 1.5.2 book - Part 40 of 181
PDF
The Ring programming language version 1.5.1 book - Part 39 of 180
PDF
The Ring programming language version 1.6 book - Part 43 of 189
PDF
The Ring programming language version 1.3 book - Part 31 of 88
PDF
The Ring programming language version 1.7 book - Part 44 of 196
PDF
The Ring programming language version 1.10 book - Part 51 of 212
PDF
The Ring programming language version 1.5.3 book - Part 41 of 184
PDF
The Ring programming language version 1.9 book - Part 49 of 210
The Ring programming language version 1.5.2 book - Part 40 of 181
The Ring programming language version 1.5.1 book - Part 39 of 180
The Ring programming language version 1.6 book - Part 43 of 189
The Ring programming language version 1.3 book - Part 31 of 88
The Ring programming language version 1.7 book - Part 44 of 196
The Ring programming language version 1.10 book - Part 51 of 212
The Ring programming language version 1.5.3 book - Part 41 of 184
The Ring programming language version 1.9 book - Part 49 of 210

What's hot (20)

PDF
The Ring programming language version 1.8 book - Part 46 of 202
PDF
The Ring programming language version 1.5.4 book - Part 42 of 185
PDF
The Ring programming language version 1.4.1 book - Part 12 of 31
PDF
The Ring programming language version 1.5.4 book - Part 41 of 185
PDF
The Ring programming language version 1.4 book - Part 12 of 30
PDF
The Ring programming language version 1.7 book - Part 45 of 196
PDF
The Ring programming language version 1.9 book - Part 50 of 210
PDF
The Ring programming language version 1.10 book - Part 50 of 212
PDF
The Ring programming language version 1.5.3 book - Part 40 of 184
PDF
The Ring programming language version 1.8 book - Part 47 of 202
PDF
The Ring programming language version 1.5.4 book - Part 40 of 185
PDF
The Ring programming language version 1.5.4 book - Part 43 of 185
PDF
The Ring programming language version 1.5.2 book - Part 41 of 181
PDF
The Ring programming language version 1.5.4 book - Part 67 of 185
PDF
The Ring programming language version 1.5.1 book - Part 40 of 180
PDF
The Ring programming language version 1.10 book - Part 52 of 212
PDF
The Ring programming language version 1.7 book - Part 47 of 196
PDF
The Ring programming language version 1.10 book - Part 22 of 212
PDF
The Ring programming language version 1.7 book - Part 46 of 196
PDF
The Ring programming language version 1.5.2 book - Part 7 of 181
The Ring programming language version 1.8 book - Part 46 of 202
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.5.4 book - Part 41 of 185
The Ring programming language version 1.4 book - Part 12 of 30
The Ring programming language version 1.7 book - Part 45 of 196
The Ring programming language version 1.9 book - Part 50 of 210
The Ring programming language version 1.10 book - Part 50 of 212
The Ring programming language version 1.5.3 book - Part 40 of 184
The Ring programming language version 1.8 book - Part 47 of 202
The Ring programming language version 1.5.4 book - Part 40 of 185
The Ring programming language version 1.5.4 book - Part 43 of 185
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.4 book - Part 67 of 185
The Ring programming language version 1.5.1 book - Part 40 of 180
The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.7 book - Part 47 of 196
The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.7 book - Part 46 of 196
The Ring programming language version 1.5.2 book - Part 7 of 181
Ad

Viewers also liked (20)

PDF
The Ring programming language version 1.2 book - Part 27 of 84
PDF
The Ring programming language version 1.2 book - Part 14 of 84
PDF
The Ring programming language version 1.2 book - Part 36 of 84
PDF
The Ring programming language version 1.2 book - Part 38 of 84
PDF
The Ring programming language version 1.2 book - Part 13 of 84
PDF
The Ring programming language version 1.2 book - Part 32 of 84
PDF
The Ring programming language version 1.2 book - Part 28 of 84
PDF
The Ring programming language version 1.2 book - Part 30 of 84
PDF
The Ring programming language version 1.2 book - Part 35 of 84
PDF
The Ring programming language version 1.2 book - Part 39 of 84
PDF
The Ring programming language version 1.2 book - Part 46 of 84
PDF
The Ring programming language version 1.2 book - Part 48 of 84
PDF
The Ring programming language version 1.2 book - Part 31 of 84
PDF
The Ring programming language version 1.2 book - Part 26 of 84
PDF
The Ring programming language version 1.2 book - Part 11 of 84
PDF
The Ring programming language version 1.2 book - Part 12 of 84
PDF
The Ring programming language version 1.2 book - Part 10 of 84
PDF
The Ring programming language version 1.2 book - Part 7 of 84
PDF
The Ring programming language version 1.2 book - Part 9 of 84
PDF
The Ring programming language version 1.2 book - Part 43 of 84
The Ring programming language version 1.2 book - Part 27 of 84
The Ring programming language version 1.2 book - Part 14 of 84
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 38 of 84
The Ring programming language version 1.2 book - Part 13 of 84
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 28 of 84
The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 39 of 84
The Ring programming language version 1.2 book - Part 46 of 84
The Ring programming language version 1.2 book - Part 48 of 84
The Ring programming language version 1.2 book - Part 31 of 84
The Ring programming language version 1.2 book - Part 26 of 84
The Ring programming language version 1.2 book - Part 11 of 84
The Ring programming language version 1.2 book - Part 12 of 84
The Ring programming language version 1.2 book - Part 10 of 84
The Ring programming language version 1.2 book - Part 7 of 84
The Ring programming language version 1.2 book - Part 9 of 84
The Ring programming language version 1.2 book - Part 43 of 84
Ad

Similar to The Ring programming language version 1.2 book - Part 29 of 84 (14)

PDF
The Ring programming language version 1.5.3 book - Part 51 of 184
PDF
The Ring programming language version 1.5.3 book - Part 52 of 184
PDF
The Ring programming language version 1.5.3 book - Part 42 of 184
PDF
The Ring programming language version 1.6 book - Part 44 of 189
PDF
The Ring programming language version 1.3 book - Part 32 of 88
PDF
The Ring programming language version 1.5.2 book - Part 42 of 181
PDF
The Ring programming language version 1.5.2 book - Part 43 of 181
PDF
The Ring programming language version 1.8 book - Part 48 of 202
PDF
The Ring programming language version 1.7 book - Part 48 of 196
PDF
The Ring programming language version 1.8 book - Part 49 of 202
PDF
The Ring programming language version 1.5.3 book - Part 15 of 184
PDF
The Ring programming language version 1.5 book - Part 8 of 31
PDF
The Ring programming language version 1.6 book - Part 46 of 189
PDF
The Ring programming language version 1.5.2 book - Part 29 of 181
The Ring programming language version 1.5.3 book - Part 51 of 184
The Ring programming language version 1.5.3 book - Part 52 of 184
The Ring programming language version 1.5.3 book - Part 42 of 184
The Ring programming language version 1.6 book - Part 44 of 189
The Ring programming language version 1.3 book - Part 32 of 88
The Ring programming language version 1.5.2 book - Part 42 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.8 book - Part 48 of 202
The Ring programming language version 1.7 book - Part 48 of 196
The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5 book - Part 8 of 31
The Ring programming language version 1.6 book - Part 46 of 189
The Ring programming language version 1.5.2 book - Part 29 of 181

More from Mahmoud Samir Fayed (20)

PDF
The Ring programming language version 1.10 book - Part 212 of 212
PDF
The Ring programming language version 1.10 book - Part 211 of 212
PDF
The Ring programming language version 1.10 book - Part 210 of 212
PDF
The Ring programming language version 1.10 book - Part 208 of 212
PDF
The Ring programming language version 1.10 book - Part 207 of 212
PDF
The Ring programming language version 1.10 book - Part 205 of 212
PDF
The Ring programming language version 1.10 book - Part 206 of 212
PDF
The Ring programming language version 1.10 book - Part 204 of 212
PDF
The Ring programming language version 1.10 book - Part 203 of 212
PDF
The Ring programming language version 1.10 book - Part 202 of 212
PDF
The Ring programming language version 1.10 book - Part 201 of 212
PDF
The Ring programming language version 1.10 book - Part 200 of 212
PDF
The Ring programming language version 1.10 book - Part 199 of 212
PDF
The Ring programming language version 1.10 book - Part 198 of 212
PDF
The Ring programming language version 1.10 book - Part 197 of 212
PDF
The Ring programming language version 1.10 book - Part 196 of 212
PDF
The Ring programming language version 1.10 book - Part 195 of 212
PDF
The Ring programming language version 1.10 book - Part 194 of 212
PDF
The Ring programming language version 1.10 book - Part 193 of 212
PDF
The Ring programming language version 1.10 book - Part 192 of 212
The Ring programming language version 1.10 book - Part 212 of 212
The Ring programming language version 1.10 book - Part 211 of 212
The Ring programming language version 1.10 book - Part 210 of 212
The Ring programming language version 1.10 book - Part 208 of 212
The Ring programming language version 1.10 book - Part 207 of 212
The Ring programming language version 1.10 book - Part 205 of 212
The Ring programming language version 1.10 book - Part 206 of 212
The Ring programming language version 1.10 book - Part 204 of 212
The Ring programming language version 1.10 book - Part 203 of 212
The Ring programming language version 1.10 book - Part 202 of 212
The Ring programming language version 1.10 book - Part 201 of 212
The Ring programming language version 1.10 book - Part 200 of 212
The Ring programming language version 1.10 book - Part 199 of 212
The Ring programming language version 1.10 book - Part 198 of 212
The Ring programming language version 1.10 book - Part 197 of 212
The Ring programming language version 1.10 book - Part 196 of 212
The Ring programming language version 1.10 book - Part 195 of 212
The Ring programming language version 1.10 book - Part 194 of 212
The Ring programming language version 1.10 book - Part 193 of 212
The Ring programming language version 1.10 book - Part 192 of 212

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Introduction to Artificial Intelligence
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Nekopoi APK 2025 free lastest update
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Transform Your Business with a Software ERP System
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
PTS Company Brochure 2025 (1).pdf.......
How to Migrate SBCGlobal Email to Yahoo Easily
Odoo Companies in India – Driving Business Transformation.pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
L1 - Introduction to python Backend.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Introduction to Artificial Intelligence
2025 Textile ERP Trends: SAP, Odoo & Oracle
Nekopoi APK 2025 free lastest update
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Transform Your Business with a Software ERP System
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
CHAPTER 2 - PM Management and IT Context
Upgrade and Innovation Strategies for SAP ERP Customers
PTS Company Brochure 2025 (1).pdf.......

The Ring programming language version 1.2 book - Part 29 of 84

  • 1. Ring Documentation, Release 1.2 The Response #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New Page { divstart([ :style = styledivcenter("800px","500px") ]) boxstart() text ( "HTTP GET Response" ) newline() boxend() divstart([ :style = stylefloatleft()+stylewidth("10%")+ 41.5. HTTP Get Example 260
  • 2. Ring Documentation, Release 1.2 stylecolor("black")+stylegradient(58) ]) newline() text ( "Name : " ) newline() newline() text ( "Address : " ) newline() newline() text ( "Phone : " ) newline() newline() text ( "Age : " ) newline() newline() text ( "City : " ) newline() newline() text ( "Country : " ) newline() newline() text ( "Note : " ) newline() newline() divend() divstart([ :style = stylefloatleft()+stylewidth("90%")+ stylecolor("black")+stylegradient(47) ]) divstart([ :style = stylefloatleft() + stylewidth("1%") ]) newline() divend() divstart([ :style = stylefloatleft() + stylewidth("95%") ]) newline() text ( aPageVars["Name"] ) newline() newline() text ( aPageVars["Address"] ) newline() newline() text ( aPageVars["Phone"] ) newline() newline() text ( aPageVars["Age"] ) newline() newline() text ( aPageVars["City"] ) newline() newline() text (aPageVars["Country"] ) newline() newline() text ( aPageVars["Notes"] ) newline() newline() divend() divend() divend() } Screen Shot: 41.5. HTTP Get Example 261
  • 3. Ring Documentation, Release 1.2 41.6 HTTP POST Example The Page User Interface #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New Page { boxstart() text( "Post Test") newline() boxend() divstart([ :style=StyleFloatLeft()+StyleWidth("100px") ]) newline() text( "Number1 : " ) newline() newline() text( "Number2 : " ) newline() newline() divend() formpost("ex7.ring") divstart([ :style = styleFloatLeft()+StyleWidth("200px") ]) newline() textbox([ :name = "Number1" ]) newline() newline() textbox([ :name = "Number2" ]) newline() newline() submit([ :value = "Send" ] ) divend() formend() } Screen Shot: 41.6. HTTP POST Example 262
  • 4. Ring Documentation, Release 1.2 The Response #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New Page { boxstart() text( "Post Result" ) newline() boxend() divstart([ :style = styleFloatLeft()+styleWidth("200px") ]) newline() text( "Number1 : " + aPageVars["Number1"] ) newline() newline() text( "Number2 : " + aPageVars["Number2"] ) newline() newline() text( "Sum : " + (0 + aPageVars["Number1"] + aPageVars["Number2"] ) ) newline() divend() } Screen Shot: 41.6. HTTP POST Example 263
  • 5. Ring Documentation, Release 1.2 41.7 Upload Files The Page User Interface #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New page { boxstart() text( "Upload File" ) newline() boxend() for x = 1 to 3 newline() next formupload("ex9.ring") text( "Customer Name : " ) textbox([ :name = "custname" ]) newline() newline() divstart([ :style = styleFloatLeft() + styleWidth("90px") ]) uploadfile("file") newline() newline() uploadfile("file2") newline() newline() submit([ :value = "Send" ]) divend() formend() } Screen Shot: 41.7. Upload Files 264
  • 6. Ring Documentation, Release 1.2 The Response #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web cUploadPath = "C:/Apache2.2/htdocs/ringapp/upload/" cUploadFolder = "/ringapp/upload/" New page { boxstart() text( "Upload Result" ) newline() boxend() newline() divstart([ :style= styleFloatLeft() + styleWidth("100px") ]) text( "Name : " + aPageVars["custname"] ) newline() divend() if aPageVars["file"] != char(13) getuploadedfile(self,"file") ok if aPageVars["file2"] != char(13) getuploadedfile(self,"file2") ok } Func getuploadedfile oObj,cFile # here we use object.property # instead of object { } to avoid executing braceend method cFileName = cUploadPath + oObj.getfilename(aPageVars,cFile) 41.7. Upload Files 265
  • 7. Ring Documentation, Release 1.2 write(cFileName,aPageVars[cFile]) system("chmod a+x "+cFileName) oObj.newline() oObj.text( "File "+cFileName+ " Uploaded ..." ) oObj.newline() imageURL = cUploadFolder+oObj.getfilename(aPageVars,cFile) oObj.link([ :url = imageURL, :title = "Download" ]) oObj.newline() oObj.image( [ :url = imageURL , :alt = :image ] ) oObj.newline() Screen Shot: 41.7. Upload Files 266
  • 8. Ring Documentation, Release 1.2 41.8 Cookies The Page User Interface #!c:ringbinring.exe -cgi Load "weblib.ring" 41.8. Cookies 267
  • 9. Ring Documentation, Release 1.2 Import System.Web New page { boxstart() text( "Cookie Test" ) newline() boxend() newline() link([ :url = "ex11.ring", :title = "Use Cookies" ]) cookie("custname","Mahmoud Fayed") cookie("custage",28) } Screen Shot: The Response #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New Page { boxstart() text( "Cookies Values" ) newline() boxend() link([ :url = "ex10.ring", :title = "back" ]) newline() divstart([:style="float:left;width:200px"]) text( "Name : " + aPageVars["custname"] ) newline() text( "Age : " + aPageVars["custage"] ) newline() divend() } Screen Shot: 41.8. Cookies 268
  • 10. Ring Documentation, Release 1.2 41.9 URL Encode The Page User Interface #!c:ringbinring.exe -cgi Load "weblib.ring" Import System.Web New Page { boxstart() text( "URLEncode" ) newline() boxend() link([ :url = "ex5.ring?Name="+URLEncode("-*{Mahmoud}*-")+ "&Address=Egypt&Phone=123456&Age=28&Notes=Programmer", :title = "Test URL Encode" ]) } Screen Shot: Screen Shot: 41.9. URL Encode 269