<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>params are added to the 
get string and data is added to post data, both need to be objects.</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>have you 
tried:</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>new 
OpenLayers.Request.issue({</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp; method: 'POST',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp; <A href="'http://www.host.com/lib/printMap.php'"><FONT 
color=#000000>url:<FONT face="Times New Roman" size=3>'</FONT></FONT><A 
href="http://www.host.com/lib/printMap.php"><FONT face="Times New Roman" 
color=#000000 size=3>http://www.host.com/lib/printMap.php</FONT></A><FONT 
face="Times New Roman" size=3><FONT color=#000000>'</FONT></A><FONT face=Arial 
size=2>,</FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial size=2>params: {</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
getStringItem1:'cheesburger',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
item2:'wambat'</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp; },</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial size=2>data:{</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; postedUsername: 
'myUsername',</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN 
class=884544021-07102008>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT 
face=Arial size=2>postedPassword: 'myPassword'</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp; },</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial size=2>success: function(request){</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
alert(request.responseText);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008></SPAN><SPAN 
class=884544021-07102008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
},</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial size=2>failure:function(request){
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
alert('BOOOOOO!');</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008></SPAN><SPAN 
class=884544021-07102008><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; 
}</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008>});</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
size=2>and have you checked the $_GET and $_POST arrays in PHP? the request 
array is usually frowned upon.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=884544021-07102008><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <B>On Behalf Of </B>Ian<BR><B>Sent:</B> 
Tuesday, October 07, 2008 4:53 PM<BR><B>To:</B> 
users@openlayers.org<BR><B>Subject:</B> [OpenLayers-Users] 
OpenLayers.Request.POST/GET errors<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>I am working on the Printing code from the wiki using the new ver. 
2.7 OpenLayers.Request.POST/GET. The problem is that data is not appearing in 
PHP's @$_REQUEST array. For example:<BR><BR>var printURL = '<A 
href="http://www.host.com/lib/printMap.php">http://www.host.com/lib/printMap.php</A>';<BR>var 
size = map.getSize();<BR>var postParams = 'width=' + size.w + '&amp;height=' + 
size.h;<BR>new OpenLayers.Request.POST({url:printURL, data:postParams, 
callback:printDone});<BR><BR>results in an empty REQUEST array. Firebug says 
width=500&amp;height=500 is posted. Same for GET:<BR><BR>var printURL = '<A 
href="http://www.host.com/lib/printMap.php">http://www.host.com/lib/printMap.php</A>';<BR>var 
size = map.getSize();<BR>var getParams = {width: size.w, height: size.h};<BR>new 
OpenLayers.Request.GET({url:printURL, params:getParams, 
callback:printDone});<BR><BR>Submitting parameters directly (eg. <A 
href="http://www.host.com/lib/printMap.php?width=500&amp;height=400">http://www.host.com/lib/printMap.php?width=500&amp;height=400</A>) 
does place the values in the REQUEST array. I'm following the examples at <A 
href="http://trac.openlayers.org/wiki/Request">http://trac.openlayers.org/wiki/Request</A> 
and using Apache 2/PHP 5.2.6/Firefox 3.03. Am I missing 
something?<BR></DIV></BODY></HTML>