phpretard Posted April 18, 2008 Share Posted April 18, 2008 This just echos "Array". WHY? if(isset($_POST['order_photo'])) { $picture = array(); $picture[0] = $_POST['S46']; $picture[1] = $_POST['QU46']; $picture[2] = $_POST['S57']; $picture[3] = $_POST['QU57']; $picture[4] = $_POST['S810']; $picture[5] = $_POST['QU810']; echo $picture; } Thank you! Quote Link to comment Share on other sites More sharing options...
DJTim666 Posted April 18, 2008 Share Posted April 18, 2008 Try this <?php if(isset($_POST['order_photo'])) { $picture = array(); $picture[0] = $_POST['S46']; $picture[1] = $_POST['QU46']; $picture[2] = $_POST['S57']; $picture[3] = $_POST['QU57']; $picture[4] = $_POST['S810']; $picture[5] = $_POST['QU810']; foreach ($picture as $key => $value) { echo "<img src='$value' alt='' /><br />"; } } ?> -- DJ Quote Link to comment Share on other sites More sharing options...
Orio Posted April 18, 2008 Share Posted April 18, 2008 Because $picture is an array. Try it this way: <?php if(isset($_POST['order_photo'])) { $picture = array(); $picture[0] = $_POST['S46']; $picture[1] = $_POST['QU46']; $picture[2] = $_POST['S57']; $picture[3] = $_POST['QU57']; $picture[4] = $_POST['S810']; $picture[5] = $_POST['QU810']; echo "<pre>"; print_r($picture); echo "</pre>"; } ?> Orio. Quote Link to comment Share on other sites More sharing options...
phpretard Posted April 18, 2008 Author Share Posted April 18, 2008 That worked well! Is there an easy way to put the array into a session var? if(isset($_POST['order_photo'])) { $picture = array(); $picture[0] = $_POST['S46']; $picture[1] = $_POST['QU46']; $picture[2] = $_POST['S57']; $picture[3] = $_POST['QU57']; $picture[4] = $_POST['S810']; $picture[5] = $_POST['QU810']; echo "<pre>"; print_r($picture); echo "</pre>"; } Quote Link to comment Share on other sites More sharing options...
Orio Posted April 18, 2008 Share Posted April 18, 2008 Yeah just assigen it... $_SESSION['data'] = $pictures; Or something similar. Orio. 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.