denoteone Posted September 13, 2010 Share Posted September 13, 2010 having issues with echo curl_setopt($ch, CURLOPT_POSTFIELDS,"name='. $name .'&email='. $email .'&macs='.$mac_addresses.'&serial=".$serialnumber); the thing is $mac_addresses is a serialized array that should look like this 4a:4:{i:0;s:14:"98340234820384";i:1;s:16:"0980342883408230";i:2;s:11:"72843729374";i:3;s:16:"4209384082304980";} but when I unserilize $mac_addressed and echo it I get \'.a:4:{i:0;s:14:\"98340234820384\";i:1;s:16:\"0980342883408230\";i:2;s:11:\"72843729374\";i:3;s:16:\"4209384082304980\";}.\' can anyone see what my issue is? Quote Link to comment Share on other sites More sharing options...
GKWelding Posted September 13, 2010 Share Posted September 13, 2010 you're using an incorrect mix of single and double quotes, do either one or the other, not both: url_setopt($ch, CURLOPT_POSTFIELDS,'name='. $name .'&email='. $email .'&macs='.$mac_addresses.'&serial='.$serialnumber); or url_setopt($ch, CURLOPT_POSTFIELDS,"name=$name&email=$email&macs=$mac_addresses&serial=$serialnumber"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.