I have changed the name to name=“Product[]” but now the I am not able to bring up the value on form processing page.
I added ; to $n++ on the code you posted because it was giving me an error. Let me know if that’s correct.
processing page is
[code]<?php
session_start();
$_SESSION[‘name’] = $_POST[‘Name’];
$_SESSION[‘email2’] = $_POST[‘Email1’];
$_SESSION[‘workphone’] = $_POST[‘Workphone’];
$_SESSION[‘address’] = $_POST[‘Address1’];
$_SESSION[‘city’] = $_POST[‘City’];
$_SESSION[‘state’] = $_POST[‘State’];
$_SESSION[‘zip’] = $_POST[‘Zip’];
$_SESSION[‘date’] = $_POST[‘Date’];
$_SESSION[‘tournamentname’] = $_POST[‘Title’];
$_SESSION[‘fees’] = $_POST[‘Fees’];
$_SESSION[‘count’] = $_POST[‘Count’];
$_SESSION[‘product’] = $_POST[‘Product’];
$_SESSION[‘qualifier’] = $_POST[‘qualifier’];
$_SESSION[‘description’] = $_POST[‘description’];
$_SESSION[‘prapproval’] = $_POST[‘PRApproval’];
$_SESSION[‘decisionmaker’] = $_POST[‘decisionmaker’];
echo $_SESSION[‘name’];
echo ‘
’;
echo $_SESSION[‘email2’];
echo ‘
’;
echo $_SESSION[‘workphone’];
echo ‘
’;
echo $_SESSION[‘address’];
echo ‘
’;
echo $_SESSION[‘city’];
echo ‘
’;
echo $_SESSION[‘state’];
echo ‘
’;
echo $_SESSION[‘zip’];
echo ‘
’;
echo $_SESSION[‘date’];
echo ‘
’;
echo $_SESSION[‘tournamentname’];
echo ‘
’;
echo $_SESSION[‘fees’];
echo ‘
’;
echo $_SESSION[‘count’];
echo ‘
’;
echo $_SESSION[‘product’];
echo ‘
’;
echo $_SESSION[‘qualifier’];
echo ‘
’;
echo $_SESSION[‘description’];
echo ‘
’;
echo $_SESSION[‘prapproval’];
echo ‘
’;
echo $_SESSION[‘decisionmaker’];
echo ‘
’;
$n = 1;
if(is_array($_POST[‘Product’])) foreach($_POST[‘Product’] as $value){
$_SESSION[$n][‘Product’] = $value;
$n++;
}
?>[/code]
Do I need to change $_POST[‘Product’] to $_SESSION[‘Product’] on code you posted?
Please remember the values are not being posted from form page to processing page right away. formposts to hosted email service like iContact, 1AutoWiz, Constant Contact and they redirect person that filled out the form to processing page.
<form name="form1" method="post" action="https://www.mcssl.com/app/contactsave.asp">
<input name="merchantid" type="hidden" id="merchantid" value="XXXXX">
<input name="ARThankyouURL" type="hidden" id="ARThankyouURL" value="http://www.XXXXXXXXX.com/charity-test2.php">
<input name="copyarresponse" type="hidden" id="copyarresponse" value="1">
<input name="defaultar" type="hidden" id="defaultar" value="0">
<input name="allowmulti" type="hidden" id="allowmulti" value="0">
<input name="visiblefields" type="hidden" id="visiblefields" value="Name,Email1,Workphone,Address1,City,State,Zip">
<input name="requiredfields" type="hidden" id="requiredfields" value="Name,Email1,Workphone,Address1,Zip">
I apologize in advance if I am not explaining myself correctly.