zeynepcakir Posted December 12, 2021 Share Posted December 12, 2021 curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams); when i try to post just form data i can also when i post just file its also okay but i cant post both of them . i try every thing on internet but nothing work i also merge on arary ' $alldata = array("data" => $data,"fileData " => $fileData);' but not works i have to say that my from data 'string' but file is array please help me thank you soo much Quote Link to comment https://forums.phpfreaks.com/topic/314305-php-curl-cant-post-both-form-data-and-file/ Share on other sites More sharing options...
gw1500se Posted December 12, 2021 Share Posted December 12, 2021 Insufficient information. You probably need to post more code. What are your curl_setopts? Particularly CURLOPT_POSTFIELDS? Be sure to use the code icon (<>) in the top menu and specify PHP. What post information does the web site expect and how do you create it? You also need to tell us what the error message is or what you get that is different from what you expect. Quote Link to comment https://forums.phpfreaks.com/topic/314305-php-curl-cant-post-both-form-data-and-file/#findComment-1592647 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.