Need help passing an associative array into 3 pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Full article available at https://groups.google.com/forum/#!topic/comp.lang.php/xR9IczYYdd8

Basically I trying to pass an assocarry to 3 pages.

First page
<?php         
session_start(); 
$_SESSION['sessionid'] = $sessionid1; 
if(mysqli_num_rows($result)){ 
 $results = array(); $i = 0; 
  while($row = mysqli_fetch_assoc($result)){ 

  $i++;         
	   
		   $sessionid1=$row['sessionid']; 
			   $abbr1=$row['abbr']; 
				   $seminar1=$row['seminar']; 
					   $date1=$row['date']; 
						   $time1=$row['time']; 
							    
								    echo '<tr>'; 

								    echo " <td class=\"style3\" align=\"center\"> 
								    <input name=\"id" .  $row['sessionid'] .  "\" id=\"id". $row['sessionid'].  "\" value=\"" .$row['abbr'].  "-" .$row['sessionid'].  "\" size=\"10\"></td> 
								    <td align=\"center\"><input name=\"price".  $row['sessionid'].  "\" id=\"price".  $row['sessionid'].  "\" value=\"63.00\" size=\"7\" type=\"checkbox\" ></td> 
								     <td class=\"style3\" align=\"center\"><input class=\"style3\" name=\"description".  $row['sessionid']. "\" id=\"description".  $row['sessionid'].  "\" value=\"".  $row['seminar'].  "\" type=\"text\"></td> 
								      <td class=\"style3\" align=\"center\"><input class=\"style3\" name=\"quantity".  $row['sessionid'].  "\" value=\"0\" size=\"4\" type=\"text\" id=\"quans".  $row['sessionid'].  "\"></td> 
								       <td align=\"center\"><div align=\"center\"><span class=\"style3\">".  $row['date'].  "&nbsp;".  $row['time'].  "</span></div>  </td>"; 

									       echo "</tr>"; 

										} 
										$results[]=$row; 
										} 

										echo $i; 
										var_export($results); 
															?> 

															and in the second page

															// Below is at issue. 

															//$connect = mysqli_connect("localhost", "pdsolutions", "tgarner7460","pdsolutions") or die ("Cannot connect"); 
															//mysqli_select_db($connect,"pdsolutions") or die("Cannot select database"); 
															//$result =  mysqli_query ($connect,"SELECT sessions.sessionid, courses.abbr, courses.seminar, sessions.date, sessions.time FROM sessions,courses WHERE sessions.courseid=courses.id AND sessions.sessionid > 712   ORDER BY sessions.sessionid ") or die('cannot show tables'); 
															//$numRows = mysqli_num_rows($result); 
															//echo "NUMBER OF ROWSC = ". $numRows .  "<br /><br />"; 
															//$numRows = $_POST[count(results)]; 
															//echo "NUMBER OF ROWSC = ". $numRows .  "<br /><br />"; 
															echo "Session". print_R($sessValue) .   "<br /><br />"; 
															$results = $_POST[$results]; 
															echo "<br />results : ". print_r($results) ."<br />"; 
															//$i = 0; 
															while ($row = mysqli_fetch_assoc($results)) { 
																 $id[]=$row['id']; 
																	  $price[]=$row['price']; 
																		   $description[]=$row['description']; 
																			    $quantity[]=$row['quantity']; 
																				    $date[]=$row['date']; 

																				    } 
																				    var_export($description); 
																				    for ($n =700 ; $n < 900; $n++) 
																				    { 

																				    //id[$n]=$_POST[id($n)]; 
																				    //description[$n]=$_POST[description($n)]; 
																				    //quantity[$n]=$_POST[quantity($n)]; 
																				    //price[$n]=$_POST[price($n)]; 
																				    //subtotal[$n]=$_POST[subtotal($n)]; 

																				    echo "<br />". description[$n] . "<br />" . quantity[$n].  "<br />" . price[$n].  "<br />" .  subtotal[$n] ."<br />"; 
																				    } 
																				    $url ="https://esqa.moneris.com/HPPDP/index.php";; //QA Url 
																				    $dataToSend = "ps_store_id=$store_id&hpp_key=$hpp_key&charge_total=$charge_total&bill_first_name=$bill_first_name&bill_last_name=$bill_last_name&bill_company_name=$bill_company_name&bill_address_one=$bill_address_one&bill_city=$bill_city&bill_state_or_province=$bill_state_or_province&bill_postal_code=$bill_postal_code&bill_phone=$bill_phone&email=$email&hpp_preload="; 


Programming pointers please to make this to work.

-- 
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
Yahweh, Queen & country!Never Satan President Republic!Beware AntiChrist rising!
https://www.empire.kred/ROOTNK?t=94a1f39b  Look at Psalms 14 and 53 on Atheism
NB 24 Sept vote Liberal!  Quebec votez contre le PQ et le QS des 1 October 2018!



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux