N
Nathan O.
(Newbie Alert!)
I have a CGI script that takes an address and tries to put it as hidden
form data on a new page. "post" is a hash of POST data.
["addr1", "addr2", "city", "state", "zip", "country"].each do |part|
puts "<input type=\"hidden\" name=\"" + part.to_s + "\" value=\"" +
post[part.to_s] + "\" />"
end
This code generates the complaint that "part" is an array, and thus
cannot be converted to a string. How do I iterate over each item in that
array of address data?
I have a CGI script that takes an address and tries to put it as hidden
form data on a new page. "post" is a hash of POST data.
["addr1", "addr2", "city", "state", "zip", "country"].each do |part|
puts "<input type=\"hidden\" name=\"" + part.to_s + "\" value=\"" +
post[part.to_s] + "\" />"
end
This code generates the complaint that "part" is an array, and thus
cannot be converted to a string. How do I iterate over each item in that
array of address data?