POST & Url Encoding

Kay C Lan lan.kc.macmail at gmail.com
Tue Jan 13 20:37:53 EST 2015


Hi Andy,

In your Blog:

on mouseUp
  //the '&' in the string will cause problems so url encode it
  put urlEncode("black&white") into tencodedString
  put "animal=" & cat & "&color=" & tencodedString into tmyData
  post tmyData to url "http://2108.co.uk/code/lc/mypost.lc?"
end mouseUp

I think you meant:

put "animal=" & "cat" & "&color=" & tencodedString into tmyData

which really should be:

put "animal=cat&color=" & tencodedString into tmyData

or you meant

put "cat" into tmyAnimal
put "animal=" & tmyAnimal & "&color=" & tencodedString into tmyData



More information about the use-livecode mailing list