PHP - Send Session Array Through The Url
Hi Guys,
How can I send a session array through the URL and then use the values on the other page to create an SQL query? Any Ideas? Thanks in advance. Ed Similar TutorialsI am trying to create an index page which contains registration and login field the problem that i get is on successful login a warning is displayed session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\Eventz.com\index.php:116) in C:\xampp\htdocs\Eventz.com\index.php on line 235 This is the login part of my index.php this tag is inside an html table below the login form I also have a registration form and its php code above the login form Code: [Select] <?php if (isset($_REQUEST['pass'])) { $id=$_POST['id']; $pass=$_POST['pass']; $conn =mysql_connect("localhost","root",""); if (!$conn) { die('Could not connect: ' . mysql_error()); } /* checking connection....success! */ $e=mysql_select_db('test', $conn); if(!$e) { die(''.mysql_error()); } else { echo 'database selected successfully'; } if (isset($_REQUEST['id']) || (isset($_REQUEST['pass']))) { if($_REQUEST['id'] == "" || $_REQUEST['pass']=="") { echo "login fields cannot be empty"; } else { $sql=mysql_query("Select email,password from login where email='$id' AND password='$pass'"); $count=mysql_num_rows($sql); if($count==1) /* $count checks if username and password are in same row */ { session_start(); $_SESSION['id']=$id; echo "</br>Login Successful</br>"; } else { echo "</br>invalid</br>"; echo "please try to login again</br>"; } } } } ?> Any help or suggestion would be appreciated in this page http://maximaart.com/newscp/ i have this problem Code: [Select] Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/maximasy/public_html/newscp/index.php:1) in /home/maximasy/public_html/newscp/index.php on line 2 my source code is <?php session_start(); include_once("config.php"); include_once("functions.php"); $errorMessage = ''; if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) { if ($_POST['txtUserId'] === "$user" && $_POST['txtPassword'] === "$pass") { // the user id and password match, $_SESSION['basic_is_logged_in'] = true; require("main.php"); exit;?> I am having trouble resolving an error. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/s519970/public_html/header.php:27) in /home/s519970/public_html/admin/login.php on line 2 What I can gather is I can't use "header (Location: 'admin.php')" after i've used session_start(). I have tried to replace the header (Location: 'admin.php') with this: echo "<script>document.location.href='admin.php'</script>"; echo "<script>'Content-type: application/octet-stream'</script>"; I've been trying to read up on solutions but haven't been able to get it sorted. If anyone can offer some advice that would be greatly appreciated as im new to php. Code: [Select] <?php session_start(); if(isset($_SESSION['user'])) echo "<script>document.location.href='admin.php'</script>"; echo "<script>'Content-type: application/octet-stream'</script>"; ?> <div id="loginform"> <form action="dologin.php" method="post"> <table> <tr> <td><span>Username:</span></td> <td><input type="text" name="username" /></td> </tr> <tr> <td><span>Password:</span></td> <td><input type="password" name="password" /></td> </tr> <tr> <td colspan="2" align="right"><input type="submit" name="login" value="Login" /></td> </tr> </table> </form> </div> I have tried using require_once('yourpage.php'); before my <head></head> tags in the header document where I've specified the html information but this doesn't seem to work. I've been advised to use ob_start("ob_gzhandler"); but I am not sure how to implement this. Any advice is greatly appreciated! Hi, I am just recently getting this error message:Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/XXX/chordsandguitar.com/index.php:46) in /home/jchords/chordsandguitar.com/index.php on line 48 this is no doubt related to the fact that my site has been hacked along with 1000's of others that are on dreamhost. I don't know if it's related to php file permissions some of my files may have had had their permission set for read-write when they should not have been. They have all been changed to the more restrictive 755 or 644. So here is how I am using the session_start to store some variables: Code: [Select] session_start(); if (!isset($_SESSION["count"])) { $_SESSION["count"]=0; } else $_SESSION["count"]++; if ($_SESSION["count"] == 0) { $scale_menu = 'C'; $variation_menu = 'maj'; $code_id = '1'; } else { //allows retreiving the value of the drop-downs after the Select button has been pushed // has to be skipped on the first access or overwrites starting vars. to null if (isset($_GET['s_menu'])) $scale_menu = $_GET['s_menu']; else $scale_menu = $_GET['scale_menu']; } So any ideas why I am getting this error? Thanks, Jacques Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/bakerde1/public_html/oceangamer.com/login.php:1) in /home/bakerde1/public_html/oceangamer.com/login.php on line 2 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/bakerde1/public_html/oceangamer.com/login.php:1) in /home/bakerde1/public_html/oceangamer.com/login.php on line 2 These are my error messages, here is my code. I don't know if it is the UTF-8 code at the start, but if it is can anyone recommend a binary editor to remove this. If it isn't what is the problem? <?php session_start(); $username = $_POST['username']; $password = base64_decode($_POST['password']); $errors = array(); if($username == 'User Name' || $username == ''){ $errors[] = 'Please enter a valid username'; } if($password == 'Password' || $password == ''){ $errors[] = 'Please enter a valid password'; } $link = mysql_connect("localhost","*****","******") or die ("Could not connect!"); mysql_select_db("chef"); $query = mysql_query("SELECT * FROM `users` WHERE `username`='$username'"); $numrows = mysql_num_rows($query); if ($numrows!=0) { while($row = mysql_fetch_assoc($query)) { $dbusername = $row['username']; $dbpassword = $row['password']; } if ($username==$dbusername&&$password==$dbpassword) { $_SESSION['user'] = $username; while ($row = mysql_fetch_array($res)) { $type = $row['Type']; } if ($type == "0") { header("location: chefpanel.php"); }else{ header("location: restpanel.php"); } } else $errors[] = 'Username or Password Incorrect'; } else $errors[] = 'Username or Password Incorrect'; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> I am confused why I am getting the following error and was wondering if I could get a 2nd pair of eyes.. error: [29-Jul-2010 20:58:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in /home/curren11/public_html/mysite***.com/file_monitor.php on line 2 [29-Jul-2010 20:58:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/curren11/public_html/mysite***.com/file_monitor.php:2) in /home/curren11/public_html/mysite***.com/file_monitor.php on line 2 Here is the code: <?php session_start(); $root_path = realpath(getcwd()); $error_monitor_file = $root_path.'/file_modify.txt'; $hour = date("H"); $today = date("m-d-Y"); $myFile2 = "file_monitor.php.log"; $fh3 = fopen($myFile2, 'a'); $log_msg = "Last ran on: ".$today." at: ".$hour." \n"; fwrite($fh3, $log_msg); function scan_dir($path) { $out = array(); $files = opendir($path); while ($f = readdir($files)) { $extension = substr($f,-3); if ($f=='.' or $f=='..' or $extension=='jpg' or $extension=='JPG' or $extension=='png' or $extension=='gif' or $f=='file_monitor.php' or $f=='file_modify.txt' or $f=='file_monitor.php.log' or $f =='error_log' ) { continue; } if (is_dir($path.'/'.$f)) { $out = array_merge($out, scan_dir($path.'/'.$f)); } //if (((!is_dir($path.'/'.$f)) && ($f!='.' or $f!='..' or $extension!='jpg' or $extension!='JPG' or $extension!='png' or $extension!='gif')) else // { $out[] = $path. '/'. $f; //} } $_SESSION['all_files'] = $out; return $out; } $a = scan_dir(getcwd()); $count_array = count($_SESSION['all_files']); $loop_count=0; while($loop_count < $count_array) { // file in directory when was it last changed ? $filechange1 = date("m-d-Y-H", filemtime($_SESSION['all_files'][$loop_count])); // was it chnaged today and have I sent out an alert yet? if($filechange1 == $today."-".$hour) { $fh2 = fopen($error_monitor_file, 'a'); fwrite($fh2, "\n alert, file: ".$_SESSION['all_files'][$loop_count]." was changed today within the last hour ! \n"); fclose($fh2); } $loop_count ++; // log file? was it changed this past hour? if (file_exists($error_monitor_file)) { $filechange_log = date("m-d-Y-H", filemtime($error_monitor_file)); if ( ($loop_count == $count_array ) && ($filechange_log == $today."-".$hour ) ) { email(); } } } // function for email... function email() { require_once ('class.phpmailer.php'); $mail = new PHPMailer(); $mail->IsSMTP(); // send via SMTP $mail->Host = "localhost"; // SMTP servers $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Username = "**c66@***ar.com"; // SMTP username $mail->Password = "*****"; // SMTP password $mail->From = "***@***.com"; $mail->FromName = "Colonial Cottage File Changed"; $mail->AddAddress("email@*****.com"); $mail->WordWrap = 50; // set word wrap //$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); $mail->IsHTML(true); // send as HTML $mail->Subject ="Unauthorized file changed today!"; $mail->Body = "" ; $mail->AltBody = "This is the text-only body"; if(!$mail->Send()) { exit(); } } if ((file_exists($error_monitor_file)) && $hour == "00") { unlink($error_monitor_file); } fclose($fh3); exit(); ?> Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/hedgehog/public_html/class/class.phpmailer.php:3005) in /home/hedgehog/public_html/admin/class/authenticate.class.php on line 15 I own a website, www.gpstudios.com Some time ago I started recieiving this error after posting comments on the playgame page/news page. Try posting comments yourself on this game: http://www.gpstudios.com/playgame.php?gameid=324 I have attached a picture of the error. Unfortunately, I have no idea when this bug appeared. It must have happened a while ago, but I never noticed. Anyone know how or why I am getting this bug? Because I'm unsure as to where/when the error occurred, I cannot supply the code. Sorry for the lack of details, but I'm hoping someone will understand this error a little better than me :S Thanks, -Tom I am getting an error message. But the program works Code: [Select] Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\Exam_Online\try.php:3) in C:\xampp\htdocs\Exam_Online\Staff_login_process.php on line 4 Wrong Username or Password my code is <Html> <?php //session_start(); include 'Staff_login_process.php'; MYSQL_CONNECT(localhost,'root','') OR DIE("Unable to connect to database"); @mysql_select_db(Examination) or die( "Unable to select database"); ?> <body> <form action="try1.php" method="post"> <?PHP $query=("SELECT * FROM User u, User_X_Subject us, Subject s WHERE u.Use_Name = '{$_SESSION['username']}' AND u.Use_ID= us.Use_ID AND s.Sub_ID=us.Sub_ID"); $result=mysql_query($query) or die ("Unable to Make the Query:" . mysql_error() ); echo "<select name=myselect>"; while($row=mysql_fetch_array($result)){ echo "<OPTION VALUE=".$row['Sub_ID'].">".$row['Sub_Name']."</OPTION>"; } echo "</select>"; ?> <input type="submit" value="submit"/> </form> </body> </html> Hello all, I have an error handler that I need to append messages to (First name not right, Last name not right, etc) I'm using a session array to handle all error messages titled GORB. How come this code won't work? $_SESSION['GORB']['message'][] = "First name wrong"; $_SESSION['GORB']['message'][] = "Last name wrong"; How can I get it to work? I already have the handler output written and functioning fine, I just need to get it to loop over an array of errors instead of just one. Hi;
I have an array of header information that i want to send before doing an echo to the page. Something like :
// Send the header information in the array below, then echo $html; die();The information in the array is for example : HTTP/1.1 200 OK Date: Sat, 09 Aug 2014 00:01:36 GMT Server: Apache/2.2.22 (Ubuntu) X-Powered-By: PHP/5.4.9-4ubuntu2 X-Logged-In: False P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Cache-Control: public, must-revalidate, proxy-revalidate Expires: Sat, 09 Aug 2014 02:01:36 GMT Connection: keep-alive, close Pragma: public Vary: Accept-Encoding Content-Type: text/html; charset=utf-8Thank you. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=347901.0 Hello, I'm working with a website's soap services to communicate with their servers, They have sent me a sample code of .Net that works properly for all methods of their web services, But while I'm trying to use the same web services via php-soap the functions that has array of string as a parameter for a method doesn't work at all, ( the other functions work fine ) Here is the sample code of .Net: Code: [Select] webServiceType ws = new webServiceType(); string res = ws.methodX("username", "password", new string[] { "x" , "y" }); but this code in PHP doesn't work fine and throw an exception $client = new SoapClient("http://webserviceURL.com?WSDL",array("features" => SOAP_SINGLE_ELEMENT_ARRAYS)); $response = $client->methodX("username","password",array ( "x" , "y" )); Any suggestion on how to pass an array of string to a method via soap- WSDL? Following is the form.Now i want to see if submit button is pressed or not.Usually if html had Code: [Select] <input type="submit" value="Submit" name = "submit" /> i would simply use Code: [Select] <?php if(isset($_POST['submit'])) ?> But below is the form which has an image as a submit button Form - Code: [Select] <form action="" method="post" id="sendemail"> <ol> <li> <label for="name">Name (required)</label> <input id="name" name="name" class="text" /> </li> <li> <label for="email">Email Address (required)</label> <input id="email" name="email" class="text" /> </li> <li> <label for="email">Phone number</label> <input id="phone" name="phone" class="text" /> </li> <li> <label for="address">Address(required)</label> <input id="address" name="address" class="text" /> </li> <li> <label for="city">City(required)</label> <input id="city" name="city" class="text" /> </li> <li> <label for="state">State(required)</label> <input id="state" name="state" class="text"/> </li> <li> <label for="zipcode">Pincode/Zipcode(required)</label> <input id="zipcode" name="zipcode" class="text" /> </li> <li> <input type="image" name="submit" id="imageField" src="images/submit.gif" class="send" /> <div class="clr"></div> </li> </ol> </form> How should i check if form is submitted or not when instead of submit button there is an image ? ----------------------------------------------------------------- Alternative Solution ---------------------------------------------------------------------------- I tried sending it to other page but then i had to send an array back to this page and i didn't know how to send that either.I tried Code: [Select] <?php $error = serialize($error); echo "<meta http-equiv='refresh' content='0;url=about.php?array=".$error."'> "; ?> But even after Code: [Select] $array = unserialize($array); $array contained nothing. Can someone please show me how to send in array in between pages for future ? why is it that i have to click add to cart 2 time inorder for the eventname and eventinfo to show up if i click one time it add to the cart but it shows nothing Code: [Select] <?php //if user attempts to add something to the cart if (isset($_POST['tid'])) { $tid = $_POST['tid']; $howmany = $_POST['howMany']; $wasFound = false; $i = 0; // If the cart session variable is not set or cart array is empty if (!isset($_SESSION["cart"]) || count($_SESSION["cart"]) < 1) { // RUN IF THE CART IS EMPTY OR NOT SET $_SESSION["cart"] = array(1 => array("item_id" => $pid, "quantity" => $howmany)); } else { // RUN IF THE CART HAS AT LEAST ONE ITEM IN IT foreach ($_SESSION["cart"] as $each_item) { $i++; while (list($key, $value) = each($each_item)) { if ($key == "item_id" && $value == $tid) { //there will recive a message $msg = "Item is already in the cart"; $wasFound = true; } // close if condition } // close while loop } // close foreach loop if ($wasFound == false) { array_push($_SESSION["cart"], array("item_id" => $tid, "quantity" => $howmany)); } } header("location: cart.php"); exit(); } ?> <?php //render the cart for the user to view on the page $cartOutput = ""; $cartTotal = ""; $product_id_array = ''; if (!isset($_SESSION["cart"]) || count($_SESSION["cart"]) < 1) { $cartOutput = "<h2 align='center'>Your shopping cart is empty</h2>"; } else { // Start the For Each loop $i = 0; foreach ($_SESSION["cart"] as $each_item) { $item_id = $each_item['item_id']; $sql = mysql_query("SELECT * FROM events WHERE id='$item_id' LIMIT 1"); while ($row = mysql_fetch_array($sql)) { $eventname = $row["eventname"]; $eventinfo = $row["eventinfo"]; $studentsprice = $row["studentsprice"]; } //adding the price of the tickets //getting the total $totalprice = $studentsprice * $howmany; setlocale(LC_MONETARY, "en_US"); //this will amke it so it looks like real money $totalprice = money_format("%10.2n", $totalprice ); $cartOutput = ""; //this is the table the will replace the table row below //this is in order $cartOutput.= "<tr>"; $cartOutput .= "<td>".$eventname."</td>"; $cartOutput .= "<td>".$eventinfo."</td>"; $cartOutput .= "<td>".$studentsprice."</td>"; $cartOutput .= "<td>".$howmany."</td>"; $cartOutput .= "<td>".$totalprice."</td>"; $cartOutput .= "<td>".X."</td>"; $cartOutput .= "</tr>"; } } ?> how do i set a session array? e.g. set session with variable $value = 13. then set the next $value = 15 . = 13 and [1]=15 how do i set this session. up? so it keeps on updating the array Hello everyone and thanks in advance for the help. I am working on a permission system for a site I am creating that will be used to restrict access to various areas of the site. I have a table with all the permission that is linked to a group that the user is a member of. I then use a query to get a list of the permission ids the user is part of and put those into the session array. I used a basic login script I found online I planned on modifying to add my own features and to make more secure. Originally it had just a member id and member name variable in the session array saved in the login script which are both working fine after login. I am using a dynamic variable to set one session variable for each permission with the id being the changing part in the variable name. The problem I found is that the new variables are not being set. When i removed the redirect from my login script so I could check the problem I found that the temp variable, which is also set before it saves to the session array, is blank as well. If I hit refresh on my browser the new variables become set and all is well. I was talking to nvee in irc chat who said I need to make a function on the page I am redirected to that checks if the variable exists. I looked through the original code of the login script I am using and found that this seems to be how they did it as well so I added an if statement to my index page to check if the variable has a value with and without using if isset. In both cases the new variable is still not getting set. He also gave me some pointers to help make my login checks more secure but the main thing IM concerned with right now is to make my new permission variables accessible to the session. My login script is available in my pastebin. I am trying to send some arrays to another page using sessions. The first array I send works fine when I simply print the array on the next page but the second and third arrays are not being created. Code Code: [Select] <?php require("dbconn.php"); $query = mysql_query("SELECT username, idcustomers FROM customers WHERE username='$customeruser' "); if (!$query) { die('Invalid query: ' . mysql_error());} $row = mysql_fetch_assoc($query); echo $row['username']; $id=$row['idcustomers']; echo $id; $productquery = mysql_query("SELECT productid, price1, price2, price3, price1_type, price2_type, price3_type, prod_name, price_det FROM product_pricing WHERE idcustomers='" . mysql_real_escape_string($id) . "' ORDER BY productid"); if (!$productquery) { die('Invalid query: ' . mysql_error());} $counter = 1; $itemcode_array = array(); while ($row = mysql_fetch_assoc($productquery)) { ?> <tr class="ordertable"> <td class="table_item" name="itemcode<?php echo $counter;?>"><?php echo $row['productid']; ?></td><?php $itemcode_send = $row['productid']; array_push($itemcode_array, $itemcode_send); ?> <td class="table_name" name="prodname<?php echo $counter;?>"><?php echo $row['prod_name']; ?></td><?php $prod_name_send = $row['prod_name']; array_push($prodname_array, $prod_name_send); ?> <td class="table_pdet" name="prod_det<?php echo $counter;?>"><?php echo $row['price_det']; ?></td><?php $price_det_send = $row['price_det']; array_push($pricedet_array, $price_det_send); ?> <td class="table_price" name="price1<?php echo $counter;?>"><?php echo $row['price1_type']; ?> $<?php echo $row['price1']; ?></td> <td class="table_quant" name="quant1"><input type="text" name="quant1<?php echo $counter;?>" size="4" /></td> <td class="table_price" name="price2<?php echo $counter;?>"><?php echo $row['price2_type']; ?> $<?php echo $row['price2']; ?></td> <td class="table_quant" name="quant2"><input type="text" name="quant2<?php echo $counter;?>" size="4" /></td> <td class="table_price" name="price3<?php echo $counter;?>"><?php echo $row['price3_type']; ?> $<?php echo $row['price3']; ?></td> <td class="table_quant" name="quant3"><input type="text" name="quant2<?php echo $counter;?>" size="4" /></td> <td class="table_note" name="notes"><input type="text" name="note<?php echo $counter;?>" size="28" /></td> </tr> <?php ($counter++); } ?> <?php mysql_close($dbConn); ?> </table> <p><input type="submit" name="submit" value="Confirm" /> <input type="reset" /></p> </form> <?php print_r($prodname_array); $_SESSION["itemcode"] = $itemcode_array; $_SESSION["prodname"] = $prodname_array; $_SESSION["pricedet"] = $pricedet_array; ?> There is some redundant and error testing code in there. The problem is $prodname_array; and $pricedet_array; are not being created even though $itemcode_array which is created the same way works fine. All values from the database are being displayed correctly (eg $row['prod_name']. Hello Everybody,
i have shopping-cart with session_product.
i add arrays per button to the session.
i want get the shipping1 and shipping2 fields from the array where the field qty great is or equal to 2 >= 2.
i did this manualy in my example to get shi1 and shi2 lines 15 and 16.
how can i get shipping1 and shipping2 automaticly?
thank you very much for your help.
here is my code
01.<?php 02.$maxshipping1=0; 03.foreach ($_SESSION['products'] as $pro1) { 04.$maxshipping1 = max($maxshipping1, $pro1['shipping1']); } 05.?> 06.<?php 07.$maxshipping2=0; 08.foreach ($_SESSION['products'] as $pro2) { 09.$maxshipping2 = max($maxshipping2, $pro2['shipping2']); } 10.?> 11.<?php 12.$maxqty=0; 13.foreach ($_SESSION['products'] as $quant) { 14.$maxqty = max($maxqty, $quant['qty']); } 15.$shi1 = $_SESSION["products"][0]["shipping1"]; 16.$shi2 = $_SESSION["products"][0]["shipping2"]; 17.?>the Arrays looks like the following: Array ( [0] => Array ( [product] => Orangensaft 0,3l [code] => 5 [qty] => 3 [price] => 2.99 [shipping1] => 5 [shipping2] => 7 ) [1] => Array ( [product] => Kuchen [code] => 3 [qty] => 1 [price] => 2.95 [shipping1] => 4 [shipping2] => 6 ) [2] => Array ( [product] => Burger 200g [code] => 4 [qty] => 1 [price] => 3.95 [shipping1] => 1 [shipping2] => 3 ) [3] => Array ( [product] => Pizza Pollo [code] => 2 [qty] => 1 [price] => 5.95 [shipping1] => 2 [shipping2] => 4 ) [4] => Array ( [product] => Sake Maki Lachs, 6 St�cke Pommes [code] => 4236134485469 [qty] => 1 [price] => 2 [shipping1] => 1 [shipping2] => 2 ) ) Hi Guys, I am having a small problem with an array. I want to push information from a form into an array. However each time I do it it just replaces the last entry in the array with the information in stead of adding a new value to the array. Code: [Select] <?php // if generate is pressed if(isset($_POST['generate'])){ // get values from form $name = htmlspecialchars($_REQUEST['add']); array_push($stack, $name); print_r($stack); } ?> Can anybody help? Thanks Ed Hi All, I'm running trying to add key and values to an array on multiple pages, but it seems to override the array each time I add variables on the next page, even though the keys are different. Each page has something like this: Code: [Select] <label class="yes"><input type="radio" name="form_field[<?php echo "number".$f1; ?>]" value="0" > Yes</label> <label class="no"><input type="radio" checked="checked" name="form_field[<?php echo "number".$f1; ?>]" value="1" > No</label> <label class="unsure"><input type="radio" name="form_field[<?php echo "number".$f1; ?>]" value="2" > Unsure</label> I then collect it as well as other page variables with: Code: [Select] session_start(); foreach($_POST as $name => $value) { $_SESSION[$name] = $value; } on all following pages. But rather than adding to the array it writes over it each time. Any ideas on what's going wrong here. Should the array simply be able to continue to collect the keys or do I need to do something else? Thanks. |