Warning: Invalid argument supplied for foreach() in /home/theau10/public_html/resources/captionSaveB.php on line 23
Warning: Invalid argument supplied for foreach() in /home/theau10/public_html/resources/captionSaveB.php on line 38
Warning: Invalid argument supplied for foreach() in /home/theau10/public_html/resources/captionSaveB.php on line 53
here is my code.....can someone point me to the incorrect code....i cant see where its going wrong
Expand|Select|Wrap|Line Numbers
- $file = "upload/$random_digit/gallery.txt";
- $imgHandle = fopen($file, 'w+') or die("can't open file");
- $iv= 1;
- $lQ = ',';
- $imgAry = $_POST['imageT'];
- $stringData = "&imgLoc=";
- fwrite($imgHandle, $stringData);
- foreach($imgAry as $key => $value){
- fwrite($imgHandle,$value .$lQ);
- }
- fclose($imgHandle);
- $tmbHandle = fopen($file, 'a+') or die("can't open file");
- $iv= 1;
- $tQ = ',';
- $tmbAry = $_POST['thumbnailT'];
- $stringData = "&tmbLoc=";
- fwrite($tmbHandle, $stringData);
- foreach($tmbAry as $key => $value){
- fwrite($tmbHandle,$value .$tQ);
- }
- fclose($tmbHandle);
- $capHandle = fopen($file, 'a+') or die("can't open file");
- $iv= 1;
- $cQ = ',';
- $capAry = $_POST['captionT'];
- $stringData = "&imgCap=";
- fwrite($capHandle, $stringData);
- foreach($capAry as $key => $value){
- fwrite($capHandle,$value .$cQ);
- }
- fclose($capHandle);