mr.web_developer Posted March 27, 2011 Share Posted March 27, 2011 Hi How are you all, I will explain me issue one by one first of all I have created a mysql database ((ftest)) and it contain a table ((test1)) and that table contin a filed ((name)) In that filed I have 3 names 1- James 2- Moly 3- Cris let's start with the first file I have it's the config.php which will connect to the mysql database second we have index.php which contain <?php /////////////////////////////////////////////////////////////////////////////// require_once "easytemplate.php"; $easy = new EasyTemplate(); $easy->Temp = 'template'; $easy->Cache = 'easycache'; include 'config.php'; /////////////////////////////////////////////////////////////////////////////// $e = mysql_query("select name from test1"); while ($row = mysql_fetch_array($e)) { extract($row); $name = $row ['name']; print $easy->display("html.tpl"); } ?> As you can see I'm defining require_once "easytemplate.php"; which is a normal Template Engine anyway It will extract all the 3 names then it will call html.tpl which contain the html design code let's see what the html.tpl contain <form action='main.php' method=post> <head> <meta http-equiv="Content-Language" content="en-us"> </head> <p><font color="#FF0000"><span style="background-color: #FFFFFF">{name}</span></font></p> <input type="checkbox" name="name" value="{name}"> <input type="submit" name="submit" value="submit" /> </form> No I will run the Index.php file to see how it looks with the template file (html.tpl) this is the snapshot from the browser What I want exactly if I did check more than one name for example Cris and Moly and then press any of the submit buttons I want the names ((Cris & Moly) to be printed in the next page which is main.php <?php /////////////////////////////////////////////////////////////////////////////// include 'config.php'; /////////////////////////////////////////////////////////////////////////////// if(isset($_POST['name'])) $names = $_POST['name']; if ($_POST){ echo $names; } ?> Now It will work but it will print only one name thank you for your time Quote Link to comment Share on other sites More sharing options...
yonny Posted March 27, 2011 Share Posted March 27, 2011 instead of <input type="checkbox" name="name" value="{name}"> try this <input type="checkbox" name="name[]" value="{name}" /> then $checks=$_POST['name']; while (list ($key,$val) = @each ($checks)) { print"$val <br>"; } Quote Link to comment Share on other sites More sharing options...
mr.web_developer Posted March 27, 2011 Author Share Posted March 27, 2011 Now it's working 100% really thank you for your time I aprichiate it can you explain to me the code and whay it's working Quote Link to comment Share on other sites More sharing options...
yonny Posted March 27, 2011 Share Posted March 27, 2011 Im glad it is working for you. When you enable multiple choice in your forms, you need to process multiple values of the same element. So you create an array of selected values by adding the brackets at the end of the element name. Then just iterate through them after post. Quote Link to comment Share on other sites More sharing options...
mr.web_developer Posted April 2, 2011 Author Share Posted April 2, 2011 I'm really thankful but actully what I did it was just a sample code and when I applied your sloution it works but when I did apply it on my orginal code it didn't work see first I have the CAB.PHP this file like the index.php and it contains connection to mysql and oracle database just for your information <?php /////////////////////////////////////////////////////////////////////////////// require_once "easytemplate.php"; $easy = new EasyTemplate(); $easy->Temp = 'template'; $easy->Cache = 'easycache'; include '../config.php'; $date1 = date('Y-CC-W'); $i = 0; /////////////////////////////////////////////////////////////////////////////// $e = mysql_query("select* from crdate"); while ($row = mysql_fetch_array($e)) { extract($row); $start_d = $row ['Start_Date']; $end_d = $row ['End_Date']; } if (isset($start_d) && ($start_d)){ $sdate = date('M j, Y', $start_d); $edate = date('M j, Y', $end_d); /////////////////////////////////////////////////////////////////////////////// $s = oci_parse($c, "select INFRASTRUCTURE_CHANGE_ID,NAME,CHANGE_TIMING,STATUS_REASON,APPROVER_SIGNATURE,APPROVAL_STATUS2,SUPPORT_GROUP_NAME,DESCRIPTION,ASLOGID,ASCHG,REGION,SCHEDULED_START_DATE,SCHEDULED_END_DATE,SERVICECI,RISK_LEVEL,CHANGE_TIMING,PRIORITY,REQUESTOR_ID,CUSTOMER_FIRST_NAME,CUSTOMER_LAST_NAME,CHANGE_REQUEST_STATUS,ASGRP from ARACCESS.ARAMCO_REPORT_CHGAPDETAILS2480 where SCHEDULED_START_DATE between '$start_d' and '$end_d' "); oci_execute($s); /////////////////////////////////////////////////////////////////////////////// include 'template/header.html'; print $easy->display("try.tpl"); /////////////////////////////////////////////////////////////////////////////// print "<form action='CAB1.php' method=post>"; while ($res = oci_fetch_array($s, OCI_ASSOC)) { $i = $i++ + 1; /////////////////////////////////////////////////////////////////////////////// $Change_Id = $res ['INFRASTRUCTURE_CHANGE_ID']; $Change_Location = $res ['REGION']; /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['SCHEDULED_START_DATE'])){ $START_DATE = $res ['SCHEDULED_START_DATE']; $START_DATE1 = date('F jS, Y', $START_DATE); } else{ $START_DATE = ""; $START_DATE1 = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['SCHEDULED_END_DATE'])){ $END_DATE = $res ['SCHEDULED_END_DATE']; $END_DATE1 = date('F jS, Y', $END_DATE); } else{ $END_DATE = ""; $END_DATE1 = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['SERVICECI'])){ $System_Service = $res ['SERVICECI']; } else{ $System_Service = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['APPROVER_SIGNATURE']) && ($res ['SUPPORT_GROUP_NAME'])){ $Approvals = $res ['APPROVER_SIGNATURE'] ." " . "(". $res ['SUPPORT_GROUP_NAME'].")"; } else{ $Approvals = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['APPROVAL_STATUS2'])){ $Approvals1 = " " . $res ['APPROVAL_STATUS2']; } else{ $Approvals1 = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['RISK_LEVEL'])){ $Risk = $res ['RISK_LEVEL']; } else{ $Risk = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['CHANGE_REQUEST_STATUS'])){ $Status = $res ['CHANGE_REQUEST_STATUS']; } else{ $Status = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['CHANGE_TIMING'])){ $Change_Type = $res ['CHANGE_TIMING']; } else{ $Change_Type = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['PRIORITY'])){ $Priority = $res ['PRIORITY']; } else{ $Priority = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['ASCHG']) && ($res['ASLOGID'])){ $Supervisor = $res ['ASCHG'] . " " . "(" .$res['ASLOGID'] . ")"; } else{ $Supervisor = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['CUSTOMER_FIRST_NAME']) && ($res['CUSTOMER_LAST_NAME']) &&($res ['REQUESTOR_ID'])){ $Requstor = $res ['CUSTOMER_FIRST_NAME'] ." ,".$res['CUSTOMER_LAST_NAME'] ." (". $res ['REQUESTOR_ID'] .")"; } else{ $Requstor = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['ASGRP'])){ $Group_name = $res ['ASGRP']; } else{ $Group_name = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['DESCRIPTION'])){ $Description = $res ['DESCRIPTION']; } else{ $Description = ""; } /////////////////////////////////////////////////////////////////////////////// if (isset ($res ['STATUS_REASON'])){ $Reason = $res ['STATUS_REASON']; } else{ $Reason = ""; } /////////////////////////////////////////////////////////////////////////////// print $easy->display("html1.tpl"); } print "</form>"; /////////////////////////////////////////////////////////////////////////////// print $easy->display("try2.tpl"); include 'template/footer.html'; /////////////////////////////////////////////////////////////////////////////// } else{ include 'template/header.html'; print $easy->display("try1.tpl"); echo "No changes avaliable"; print $easy->display("try2.tpl"); include 'template/footer.html'; } ?> and now with the remplate file <form action='CAB1.php' method=post> <div id="content" align="center"> <table border="0" cellpadding="0" cellspacing="0" width="942" style="border-collapse: collapse;width:708pt"> <colgroup> <col width="38" style="width: 29pt"> <col width="113" style="width: 85pt"> <col width="110" style="width: 83pt"> <col width="23" style="width: 17pt"> <col width="64" style="width: 48pt"> <col width="70" style="width: 53pt"> <col width="23" style="width: 17pt"> <col width="128" style="width: 96pt"> <col width="23" style="width: 17pt"> <col width="132" style="width: 99pt"> <col width="23" style="width: 17pt"> <col width="173" style="width: 130pt"> <col width="22" style="width: 17pt"> </colgroup> <tr height="25" style="height:18.75pt"> <td rowspan="10" height="205" width="38" style="height: 153.75pt; width: 29pt; font-size: 14.0pt; font-weight: 700; text-align: center; vertical-align: middle; color: black; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; white-space: nowrap; border-left: 1.0pt solid windowtext; border-right: .5pt solid windowtext; border-top: .5pt solid windowtext; border-bottom: 1.5pt solid black; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #C5D9F1"> {i}</td> <td width="113" style="width: 85pt; font-size: 14.0pt; font-weight: 700; color: black; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #C5D9F1"> Change ID</td> <input type="checkbox" name="Change_Id[]" value="{Change_Id}" /> <input type="submit" name="submit" value="submit" /> <td colspan="5" width="290" style="width: 218pt; font-size: 14.0pt; font-weight: 700; text-align: center; color: black; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #C5D9F1"> {Change_Id}</td> <td colspan="6" width="501" style="width: 376pt; font-size: 14.0pt; font-weight: 700; text-align: center; color: black; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #C5D9F1"> {Group_name}</td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Description</td> <td colspan="11" style="color: blue; text-align: left; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Description} </td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Change Location</td> <td colspan="11" style="color: windowtext; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Change_Location}</td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Start Date</td> <td colspan="5" style="color: windowtext; font-size: 10.0pt; font-family: Arial, sans-serif; text-align: left; font-weight: 400; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: medium none; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {START_DATE1}</td> <td style="font-weight: 700; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: .5pt solid windowtext; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:15%; height:15%"> Change Type</td> <td colspan="5" style="color: red; font-weight: 700; text-align: left; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> <IF NAME="{Change_Type} == 1000"> Emergency <ELSEIF NAME="{Change_Type} == 2000"> Expedited <ELSEIF NAME="{Change_Type} == 3000"> Latent <ELSEIF NAME="{Change_Type} == 4000"> Normal <ELSEIF NAME="{Change_Type} == 5000"> No Impact <ELSE> Standard </IF> </td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> End Date</td> <td colspan="5" style="color: windowtext; font-size: 10.0pt; font-family: Arial, sans-serif; text-align: left; font-weight: 400; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: medium none; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {END_DATE1}</td> <td style="font-weight: 700; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: .5pt solid windowtext; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC"> Priority</td> <td colspan="5" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> <IF NAME="{Priority} == 0"> Critical <ELSEIF NAME="{Priority} == 1"> High <ELSEIF NAME="{Priority} == 2"> Medium <ELSE> Low </IF> </td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> System/Service</td> <td colspan="11" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {System_Service}</td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Change Benefits</td> <td colspan="5" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> <IF NAME="{Reason} == 1000"> Fix/Repair <ELSEIF NAME="{Reason} == 2000"> New Functionality <ELSEIF NAME="{Reason} == 3000"> Maintenance <ELSEIF NAME="{Reason} == 4000"> Upgrade <ELSE> Other </IF> </td> <td style="font-weight: 700; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; text-align: general; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC"> Coordinator</td> <td colspan="5" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Supervisor}</td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; color: windowtext; font-weight: 700; text-align: left; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Risk Level</td> <td colspan="5" style="color: #0D0D0D; text-align: left; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: medium none; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Risk}</td> <td style="font-weight: 700; text-align: left; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: .5pt solid windowtext; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC"> Requestor</td> <td colspan="5" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Requstor}</td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; vertical-align: middle; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: medium none; border-bottom: medium none; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Status</td> <td colspan="11" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> <IF NAME="{Status} == 0"> Draft <ELSEIF NAME="{Status} == 1"> Request For Authorization <ELSEIF NAME="{Status} == 2"> Request For Change <ELSEIF NAME="{Status} == 3"> Planning In Progress <ELSEIF NAME="{Status} == 4"> Scheduled For Review <ELSEIF NAME="{Status} == 5"> Scheduled For Approval <ELSEIF NAME="{Status} == 6"> Scheduled <ELSEIF NAME="{Status} == 7"> Implementation In Progress <ELSEIF NAME="{Status} == 8"> Pending <ELSEIF NAME="{Status} == 9"> Rejected <ELSEIF NAME="{Status} == 10"> Completed <ELSEIF NAME="{Status} == 11"> Closed <ELSE> Cancelled </IF> </td> </tr> <tr height="20" style="height: 15.0pt"> <td height="20" style="height: 15%; font-weight: 700; text-align: left; vertical-align: middle; color: black; font-size: 11.0pt; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; white-space: nowrap; border-left: medium none; border-right: .5pt solid windowtext; border-top: .5pt solid windowtext; border-bottom: 1.5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px; background: #D8E4BC; width:16%"> Approvals</td> <td colspan="11" style="text-align: left; color: black; font-size: 11.0pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri, sans-serif; vertical-align: bottom; white-space: nowrap; border-left: medium none; border-right: 1.5pt solid black; border-top: .5pt solid windowtext; border-bottom: 1.5pt solid windowtext; padding-left: 1px; padding-right: 1px; padding-top: 1px"> {Approvals} <IF NAME="{Approvals1} == 0"> Pending <ELSEIF NAME="{Approvals1} == 1"> Approved <ELSEIF NAME="{Approvals1} == 2"> Rejected <ELSEIF NAME="{Approvals1} == 3"> Hold <ELSEIF NAME="{Approvals1} == 4"> More Information <ELSEIF NAME="{Approvals1} == 5"> Cancelled <ELSEIF NAME="{Approvals1} == 6"> Error <ELSE> Preview </IF> </td> </tr> </table> </div> </form> and this the next file CAB1.php should print the Chande_Id which is in CAB.php <?php require_once "easytemplate.php"; $easy = new EasyTemplate(); $easy->Temp = 'template'; $easy->Cache = 'easycache'; include '../config.php'; include 'template/header.html'; print $easy->display("try.tpl"); //////////////////////////////////////////////////////////////////////////// $checks=$_POST['Change_Id']; if ($_POST){ while (list ($key,$val) = @each ($checks)) { print"$val <br>"; } } //////////////////////////////////////////////////////////////////////////// print $easy->display("try2.tpl"); include 'template/footer.html'; ?> when I click sumbit it will only print the Change_Id that the submit botton are next too so if i select 3 Change Id it will print only the one that the sumbit bottom realted with for ex if I did select the both check box and click on bottom 1 it will print the change Id that is next to it if I click on number 2 it will print the chang id that next to it thank you Quote Link to comment Share on other sites More sharing options...
mr.web_developer Posted April 2, 2011 Author Share Posted April 2, 2011 I did solve it just remove the post action from the template file thank you 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.