PHP - Displaying Comma Delimited Array Values Into Checkbox Php
I am trying to give role based access here. I want to display the pages which user has access in checkbox format. Here is my code $sql = "SELECT p.page_id AS pid, p.page, p.href, ra.pages AS rpage FROM pages p INNER JOIN role_access ra WHERE p.page_id IN (ra.page) AND ra.role=1"; $query = mysqli_query($con, $sql) or die(mysqli_error($con)); $checked_arr = array(); while($row = mysqli_fetch_array($query)) { $checked_arr = explode(",",$row['rpage']); foreach ($checked_arr as $page) { echo "<br/><input type='checkbox' name=\"pages[]\" value='$page' />$page<br>"; } My tables are like this ROLE CREATE TABLE `role` ( `rid` int(5) NOT NULL, `role_name` varchar(50) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `role` (`rid`, `role_name`) VALUES (1, 'Admin'), (2, 'Others'); ALTER TABLE `role` ADD PRIMARY KEY (`rid`); ROLE-ACCESS CREATE TABLE `role_access` ( `id` int(10) NOT NULL, `page` varchar(160) NOT NULL, `role` int(7) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO `role_access` (`id`, `page`, `role`) VALUES (1, '1,2,3,4,5', 1), (2, '2,4,5', 2); ALTER TABLE `role_access` ADD PRIMARY KEY (`id`); PAGES CREATE TABLE `pages` ( `page_id` int(11) NOT NULL, `code` varchar(10) NOT NULL, `page` varchar(100) NOT NULL, `href` varchar(255) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `pages` (`page_id`, `code`, `page`, `href`) VALUES (1, 'Patient', 'Registration', '/patient_registration.php'), (2, 'Patient', 'List', '/patient_list.php'), (3, 'Patient', 'Edit', '/edit_patient.php'), (4, 'Patient', 'Export', '/export_patient.php'), (5, 'Patient', 'MRD', '/patient_MRD.php'); ALTER TABLE `pages` ADD PRIMARY KEY (`page_id`);
In above query i get result like this
But required result is
if i change checkbox display like while($row = mysqli_fetch_array($query)) { $checked_arr = explode(",",$row['rpage']); $pname = $row['page']; foreach ($checked_arr as $page) { echo "<br/><input type='checkbox' name=\"pages[]\" value='$page' />$pname<br>"; } } i get result
How to get the names for that file.
Similar TutorialsHey! I have a table and in that table I have a "name" field, and a "description" field. I'm trying to make a tag system for these rows. I'd like to use a denormalized approach because I can't wrap my head around a normalized approach. I don't have a problem adding, for instance, catid_1, catid_2, catid_3 columns and do a WHERE statement to fetch only rows with that particular column IE: $sql = mysql_query("SELECT * FROM tablename WHERE catid_1='categorynameortag' ORDER BY DESC") How would I make it so rather than having individual columns, I can put all that data into one field with comma's. Then also, how would I fetch and display only rows with one of the words in the field? Thank you for your help. I am attempting to submit a form that includes multiple check boxes for one data field. I have set it up the implode the data and make it a comma delimited array. I am able to echo the results, yet I have not been able to post the information to the database. I believe that I have just one simple thig to do, yet I am not being successful. Here is my code I have attached the .txt file also: <?php require_once('Connections/rotarysantarosa.php'); ?> <?php if (isset($_POST['submit'])) { if (isset($_POST['currentClubPosition'])) { $strcurrentClubPosition = implode(",", $_POST['currentClubPosition']); } else { $strcurrentClubPosition = ""; } } ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmMemberInsert")) { $insertSQL = sprintf("INSERT INTO members (firstName, lastName, photo, pastPresident, currentClubPosition, classification, workPosition, company, workAddress, workCity, workState, workZip, officePhone, fax, homePhone, cellPhone, email, website, homeAddress, homeCity, homeState, homeZip, birthdayMonth, birthdayDay, spouse, yearJoined) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['firstName'], "text"), GetSQLValueString($_POST['lastName'], "text"), GetSQLValueString($_POST['photo'], "text"), GetSQLValueString($_POST['pastPresident'], "text"), GetSQLValueString($_POST['currentClubPosition'], "text"), GetSQLValueString($_POST['classification'], "text"), GetSQLValueString($_POST['workPosition'], "text"), GetSQLValueString($_POST['company'], "text"), GetSQLValueString($_POST['workAddress'], "text"), GetSQLValueString($_POST['workCity'], "text"), GetSQLValueString($_POST['workState'], "text"), GetSQLValueString($_POST['workZip'], "text"), GetSQLValueString($_POST['officePhone'], "text"), GetSQLValueString($_POST['fax'], "text"), GetSQLValueString($_POST['homePhone'], "text"), GetSQLValueString($_POST['cellPhone'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['website'], "text"), GetSQLValueString($_POST['homeAddress'], "text"), GetSQLValueString($_POST['homeCity'], "text"), GetSQLValueString($_POST['homeState'], "text"), GetSQLValueString($_POST['homeZip'], "text"), GetSQLValueString($_POST['birthdayMonth'], "text"), GetSQLValueString($_POST['birthdayDay'], "int"), GetSQLValueString($_POST['spouse'], "text"), GetSQLValueString($_POST['yearJoined'], "int")); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $Result1 = mysql_query($insertSQL, $rotarysantarosa) or die(mysql_error()); $insertGoTo = "members.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsStates = "SELECT * FROM states ORDER BY stateName ASC"; $rsStates = mysql_query($query_rsStates, $rotarysantarosa) or die(mysql_error()); $row_rsStates = mysql_fetch_assoc($rsStates); $totalRows_rsStates = mysql_num_rows($rsStates); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsMemberInsert = "SELECT * FROM members ORDER BY lastName ASC"; $rsMemberInsert = mysql_query($query_rsMemberInsert, $rotarysantarosa) or die(mysql_error()); $row_rsMemberInsert = mysql_fetch_assoc($rsMemberInsert); $totalRows_rsMemberInsert = mysql_num_rows($rsMemberInsert); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsClubPosition = "SELECT * FROM clubpositions ORDER BY `Club Position` ASC"; $rsClubPosition = mysql_query($query_rsClubPosition, $rotarysantarosa) or die(mysql_error()); $row_rsClubPosition = mysql_fetch_assoc($rsClubPosition); $totalRows_rsClubPosition = mysql_num_rows($rsClubPosition); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsClassification = "SELECT * FROM classifications ORDER BY Classification ASC"; $rsClassification = mysql_query($query_rsClassification, $rotarysantarosa) or die(mysql_error()); $row_rsClassification = mysql_fetch_assoc($rsClassification); $totalRows_rsClassification = mysql_num_rows($rsClassification); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsBirthMonth = "SELECT * FROM birthdaymonth"; $rsBirthMonth = mysql_query($query_rsBirthMonth, $rotarysantarosa) or die(mysql_error()); $row_rsBirthMonth = mysql_fetch_assoc($rsBirthMonth); $totalRows_rsBirthMonth = mysql_num_rows($rsBirthMonth); mysql_select_db($database_rotarysantarosa, $rotarysantarosa); $query_rsBirthDay = "SELECT * FROM birthdayday ORDER BY birthdayday ASC"; $rsBirthDay = mysql_query($query_rsBirthDay, $rotarysantarosa) or die(mysql_error()); $row_rsBirthDay = mysql_fetch_assoc($rsBirthDay); $totalRows_rsBirthDay = mysql_num_rows($rsBirthDay); ?> I need to some how pull comma separated images $data[23] from this $data array and then put them into there own array so I can insert them into separate rows in a database. This is the provided array: $data[0] => VIN $data[1] => StockNumber ...(all the other number here) $data[23] => Image_URLs (comma seperated) $data[24] => Equipment // I need something like this (obviously doesn't work?!@#) $delimiter = ","; $img = explode($delimiter, $data[23]); foreach($img as $pic){ $sqlPic = "insert into class_prodimages (pid image rank) values('".$LastId['id']."', '$pic', '".rand(1,20)."')"; } Any help here? Hello all, I'm trying to get better at manipulating arrays and I'm stumped on this one. What would be the most efficient way of converting an array such as this: Quote Array ( [3] => 3 [9] => 1 [15] => 9 ) Into this: Quote 3,3,3,9,15,15,15,15,15,15,15,15,15 What I have is a page with a list of cars, each with a checkbox next to them. Code: [Select] <?php $sth = null; $count = 0; $sth = $dbh->prepare("SELECT * FROM garage WHERE warehouse_id = ? ORDER BY car_name ASC"); $sth->execute(array($_POST['ware_id'])); echo "<table>"; echo "<tr>"; echo '<td>Choose Vehicles:</td>'; echo "</tr>"; echo "<tr>"; echo "<td>"; echo "<form action='warehouse_ship_3.php' method='POST'>"; while($row = $sth->fetch()){ echo "<input type='checkbox' name='cars' value='".$row['uci']."' /> ID: ".$row['uci'].", ".$row['car_year']." ".$row['car_name']."<br />"; } echo "<input type='hidden' name='ware_id' value='".$_POST['ware_id']."' />"; echo "<hr />"; echo '<div class="center"><input class="myButton" type="submit" name="submit" value="Next" /></div></form>'; echo "</td>"; echo "</tr>"; echo "</table>"; ?> That works fine. What I'm trying to do with this second page, is select all the car's info from a table called "garage" which stores data for all the cars (car name, year, etc) and display it. UCI stands for Unique car id, every car has a different id. It works when the user only selects one car on the previous page, but if they select two or more cars, only the car with the highest UCI number shows up. How would I work it to display info on every car that they selected? Code: [Select] <?php if(empty($_POST['cars'])) { echo("You didn't select any cars."); } else { $sth = $dbh->prepare("SELECT * FROM `garage` WHERE `uci` = ?"); $sth->execute(array($_POST['cars'])); while($cars = $sth->fetch()){ echo" ".$cars['uci'].", ".$cars['car_year']." ".$cars['car_name']." "; } } ?> Hello, I am trying to update my database with multiple array values like this. if (isset($_POST['submit_multiple'])) { $id=$_POST['selector']; $class=$_POST['class']; $section=$_POST['section']; $N = count($id); for($i=0;$i<$N;$i++) { echo "update table1 set transfer_status='yes',transfer_date='".date('Y-m-d')."',class='".$class[$i]."',section='".$section[$i]."' where enroll_no='".$id[$i]."'"; }and in the form <form action="transfer_mul_student.php" method="post"><select name="class[]"> <option value="">--SELECT CLASS--</option> <option value="Nursery">Nursery</option> <option value="LKG">LKG</option> <option value="UKG">UKG</option> <option value="I">I</option> <option value="II">II</option> <option value="III">III</option> <option value="IV">IV</option> </select> <select name="section[]"><option value="">--SELECT SECTION--</option> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select><input name="selector[]" id="selector" type="checkbox" value="<?php echo $row['enroll_no']; ?>" /> <input type="submit" class="delete_multiple" value="Transer" name="submit_multiple" />Here $row['enroll_no']is from table student. I have attached the screenshot for the page display with form err1.PNG 12.04KB 0 downloads, In that If i select checkbox1, checkbox2 checkbox3.. it takes the value for class and section properly, but if i select checkbox1, checkbox3, it takes value for 1st record properly and for 2nd one it takes blank value for class and section. How to overcome this? Please suggest Hi all, I have a situation where I need to remember what check boxes where checked over pagination, I have managed to do this via the use of this: http://jamesfunk.com/wordpress/?p=65 The problem is that as the code stood: Code: [Select] <input type="checkbox" name="compare" value="<?php echo $list['jobseeker_id'];?>" class="remember_cb"/> It was treating one ticked checkbox as them all because they all have the same name and are in the a while loop! I countered this by changing the code to: Code: [Select] <input type="checkbox" name="compare<?php echo $list['jobseeker_id']?>" value="<?php echo $list['jobseeker_id'];?>" class="remember_cb"/> Which effectively now makes the checkbox name unique... i.e. compare{id}. The problem with this is that I can now no longer process it. This is my processing code: $jobseekers = $_POST['compare']; $i = 0; for($i; $i<count($jobseekers); $i++){ $query = "SELECT * FROM jobseekers WHERE jobseeker_id = '$jobseekers[$i]'"; $result = mysql_query($query) or die (mysql_error()); while ($row = mysql_fetch_array($result)) { // Spit out the required data } } As you can see I am trying to get the data from $_POST['compare'], which will obviously now be blank as I have had to make the name unique.... the trouble is I'm not sure how to actually process this. Can anyone help me out here? any help or advice would be greatly appreciated! many thanks, Greens85 ok .. so I have this object and I want to make a tab delimited text file from it. here's what I have so far. function create_tab_file_from_object($the_object) { $string = ''; foreach($the_object as $val) { $string .= $val.'\t'; } //drop last tab $string = substr($string,0,-2); filename = 'test_file_pickup.txt'; $fp = fopen('/filepath/'.$filename,'w'); fwrite($fp,$string); fclose($fp); } when i run this i get a text file that looks something like this field1\tfield2\tfield3\t ... and so on. How do I get php to make an actual tab delimited file I can open in notepad or excel or whatever.. Thanks in advance, C Hi all! Ok I am trying to put a delimited list like so , EX. item qty, item name, item price | item qty, item name, item price | item qty, item name, item price | etc. into an array so I can access it like this - $product[0] = qty, $product[1] = name, etc. My code just isnt working. This is what I have so far. $prod = array(); //breaking products text down for display $products1 = explode("|", $products); $num_prod1 = count($products1); $count = 0; foreach($products1 as $p) { $prod[] = $p; $products2 = explode(",", $p); foreach($products2 as $p2) { $prod[$count] = $prod[$count][$p2]; } $count++; } I am trying to add a comma between each variable selected on a multiple checkbox form. I was able to successfully add a comma between each variable, but if a checkbox isn't selected it still uses a comma in the array. I'm sure it's just a simple if/else statement, but I'm a newbie and I'm not quite sure how to solve. Please see a sample below. Any help is much appreciated. Thank you in advance! Code: [Select] <?php $accessories_ary = array($field_Charger, $field_Case, $field_Software, $field_Manual, $field_Box); $accessories = implode(", ", $accessories_ary); substr_replace($accessories ,"",-1); echo $accessories ?> Hello Guys, I am trying to insert a value in my table like this image.jpg,image2.jpg,image3.jpg Currently it just runs the image names together Here is my code.. I tried to use explode, but it just adds the word "array" in the table. Please advise $filename2 = $phstring; } $csv = $filename2; $fphoto = explode(',', $csv); // Insert ad details into mysql $query = "INSERT INTO ads (ad_type,ad_title,ad_body,ad_category,ad_photo,ad_member,ad_status,ad_city,ad_state,ad_zip)VALUES('".$ad_type."','".$ad_title."','".$ad_body."','".$catid."','".$fphoto."','".$vname."','".$ad_status."','".$city."','".$state."','".$zip."')"; How can i save array from inputs, witch is $igraci and it have 5 values, to mysql base, i tryed but in mysql it shows Array. This is form: <form action="dodaj_klan.php" method="post" > <p> <label>Naziv klana:</label> <input name="naziv" type="text" size="20%" /> <label>Web Sajt:</label> <input name="website" type="text" size="20%" /> <label>E-Mail:</label> <input name="email" type="text" size="20%" /> <br /><br /> <label>Igraci klana(5):</label> <input name="lider" type="radio" value="1" /> <input name="igraci[]" type="text" size="20%" /><br /> <input name="lider" type="radio" value="2" /> <input name="igraci[]" type="text" size="20%" /><br /> <input name="lider" type="radio" value="3" /> <input name="igraci[]" type="text" size="20%" /><br /> <input name="lider" type="radio" value="4" /> <input name="igraci[]" type="text" size="20%" /><br /> <input name="lider" type="radio" value="5" /> <input name="igraci[]" type="text" size="20%" /> <label><i>(obelezi lidera klana)</i></label> <br /><br /> <input class="button" type="submit" name="submit" value="Dodaj" /> </p> </form> Now i wonna save this igraci[] array in mysql, i tried like this but it doesn't work: $igraci = $_POST['igraci']; $query = "INSERT INTO klanovi (naziv, website, email, igraci) VALUES ('{$naziv}', '{$website}', '{$email}', '{$igraci}')"; $result = mysql_query($query, $connection); How can i do this? Thanks.. So I'm trying to create an Array from a comma separated string containing array{s}. How can I take a string full of comma separated hex values such as : <?php $myStr = ( "00ffff", "00cccc", "009999", "007777", "004444", "001111", "01ffff", "01cccc", "019999" ); ?> & turn it into 3 separated arrays like : <?php $myNewArrs = [ Array1 ( 3 ), Array2 ( 3 ), Array3 ( 3 ), ]; ?> which REALLY looks like : <?php $myNewArrs = [ Array ( "00ffff", "00cccc", "009999" ), Array ( "007777", "004444", "001111" ), Array ( "01ffff", "01cccc", "019999" ), ]; ?>
? Thank you & have a great afternoon!
Edited May 27 by AquariaXI I have a file that is uploaded by the user that has a series of rows of data in an html table. The columns are always a constant, but the number of rows in the file can change. These rows of the html table are the only information in the file when I am processing it. I need to either convert the file to a CSV file or write the values to a CSV list so that I can then insert them into a database. Any suggestions would be wonderful...I've spent the last three hours spinning my wheels. Here is an example of one row of data from the file: Code: [Select] <tr><td bgcolor=#dddddd class=dataFT >5 (Excellent)</td><td bgcolor=#dddddd class=dataFT >5 (Excellent)</td><td bgcolor=#dddddd class=dataFT >5 (Excellent)</td><td bgcolor=#dddddd class=dataFT > </td><td bgcolor=#dddddd class=dataFT > </td><td bgcolor=#dddddd class=dataFT >DATA</td><td bgcolor=#dddddd class=dataFT >1015020</td><td bgcolor=#dddddd class=dataFT >155498322</td><td bgcolor=#dddddd class=dataFT >DATA</td><td bgcolor=#dddddd class=dataFT >4731751</td><td bgcolor=#dddddd class=dataFT >2011-09-25 11:18:33 (-5:00)</td><td bgcolor=#dddddd class=dataFT >2011-09-25 12:16:50 (-5:00)</td><td bgcolor=#dddddd class=dataFT >0:58:17</td><td bgcolor=#dddddd class=dataFT >0:58:16</td><td bgcolor=#dddddd class=dataFT >DATA</td><td bgcolor=#dddddd class=dataFT >DATA</td><td bgcolor=#dddddd class=dataFT >DATA</td><td bgcolor=#dddddd class=dataFT >Resolved</td></tr> I created a simple search box which will query my table and match the input value to one of my columns. two of these columns store comma separated values. if i query a column other than a column which stores my csv i can see my search results. if i query a column which stores my csv i will not see results unless the search value matches the first value within the column. how would i be able to get say the second or third or forth value. here is the code i am using to query the table any help would be appreciated thanks. Code: [Select] $q = $this->db->query("SELECT * FROM table WHERE col1 LIKE 'searchvalue'". " OR col2 LIKE 'searchvalue'". " OR col3 LIKE 'searchvalue'". " OR col4 LIKE 'searchvalue'". " OR FIND_IN_SET('searchvalue', col5) > 0 ". " OR FIND_IN_SET('searchvalue', col6) > 0"); This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342695.0 I need to loop through my db and create strings from 2 columns on my db. data in column1 is '22,33,33,33,25,25,25,14,14,14,14,14,14' data in column2 is '11am,12pm,1pm,2pm,3pm,4pm,5pm,6pm,7pm,8pm,9pm,10pm, 11pm' the end result I need is a string such as: $body= "11am, 22 <line break> 12pm, 33 <line break> ...... If anyone has any examples of something like this or can get me started it would be much appreciated. How can i convert an array of results to a single comma separated string so that I can run it through an SQL query? Basically i made a form with checkbox using post.. here's the form Code: [Select] <?php echo '<form name="formupload" method="post" action="val3.php">'; echo '<input type="image" src="images/reject.png" name="test" width="170" height="35" border="0" value="reject">'; echo "<table border=\"5\" >"; echo "<tr><th>List of Instructor</th>"; if(mysql_num_rows($result)) { while($row = mysql_fetch_assoc($result)) { echo "<tr><td>"; echo "<input type='checkbox' name='list[]' value='".$row['fullname']."'>" .$row['fullname']."<br/></td>"; echo "</tr>"; } } else { echo "<tr><td>No one to Approve</td></tr>"; } echo '</form>'; ?> Then my val3.php will output the values of the checked checkbox. here's the code. Code: [Select] <?php foreach ($_REQUEST['list'] as $checkbox) { echo $checkbox; echo "<br/>"; } ?> Now i don't know how to insert those values to my database.. help pls. Trying to get a form to display checked and unchecked values based on what is in the database. Hard coded form works fine. I implode the array and it goes into the database as a comma delimited string. But I need to let users edit the checkbox values, so I need to create the form by exploding the string, iterating through the array, and outputting the checkbox form elements. Here's what I have... Code: [Select] <p>Specialization: <p> <?php //echo $session->userinfo['specialization']; THIS DISPLAYS THE STRING CORRECTLY $aSpecialization = array('Automotive', 'Aerospace', 'Biotech/Life Sciences', 'Chemicals', 'Damages Analysis', 'Electronics', 'Litigation', 'Manufacturing ', 'Materials', 'Medical Devices', 'Mobile Applications', 'Patent Prosecution', 'Physics', 'Renewable Energy', 'Semiconductors', 'Software', 'Telecommunications', 'Utilities'); //converting comma separated into array using explode function $dbspecialization= explode(',',$session->userinfo['specialization']); // echo $dbspecialization; THIS IS CONFIRMED AS AN array foreach ($aSpecialization as $specialization) { if(in_array($specialization,$dbspecialization)) { echo '<input name="specialization[]" type="checkbox" value="$specialization" CHECKED> $aSpecialization[] <br />'; } else { echo '<input name="specialization[]" type="checkbox" value="$specialization"> $aSpecialization[] <br />'; } } ?> But the output I get is... Code: [Select] <input name="specialization[]" type="checkbox" value="$specialization" CHECKED> $aSpecialization[] <br /> <input name="specialization[]" type="checkbox" value="$specialization"> $aSpecialization[] <br /> <input name="specialization[]" type="checkbox" value="$specialization"> $aSpecialization[] <br /> etc... What am I missing? |