index of $_POST seemingly empties at random

Maydaygah

New Member
Ok so this is driving me insane! I've got a script written that takes user submitted product information from a previous page and sends it to the user's facebook business page via the facebook php sdk. Here's the php code:\[code\]$app_id = "1234567890"; $app_secret = "1234567890";$page_id = "1234567890";$page_token = "1034921234567890"; $store_name = "MyStore.com"; $store_url = 'http://www.mystore.com'; $cur = '$'; $new_message = "New Product!"; $prod_image = $store_url . "/images/" . $_POST['products_image']; $price = $products_price; $prod_url = $store_url . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id; $prod_name = $_POST['products_name'][1]; $prod_description = $_POST['products_description'][1];include_once 'facebook/facebook.php';$facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $app_secret, 'cookie' => true, ));$attachment = array('access_token' => $page_token,'message' => $new_message,'name' => $prod_name,'link' => $prod_url,'caption' => 'Price: '.$cur . $price,'description' => $prod_description,'picture' => $prod_image);\[/code\]Everything sends to facebook fine except on some servers$prod_description aka $_POST['products_description'][1] ends up empty. When a \[code\]var_dump($_POST['products_description']);\[/code\] is placed on the same line, it comes back with:\[quote\] array(1) { [1] => string(35) "This is a test product description." }\[/quote\]So I know the information is there and not being overwritten it's just for whatever reason when sent to facebook (with cURL from the include_once file) it doesn't post. I should also say that this is a Zen Cart mod that is available for download and I while haven't been able to reproduce the error myself (test on 4 different servers) I have had miltiple users add the var_dump and send me the results.I guess my question is; Is there something (like a ini setting, cURL option, etc) that may vary from server to server that would cause random indexes to empty when sent via cURL and is there something I can do to fix it?Thanks in advance.
 
Back
Top