473,511 Members | 14,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to pass SESSION values to table ?

aveeva
33 New Member
I am under developing PHP add to cart without DB, so that i am using SESSION, actually get data from fetch_data.php data to my_cart.php using the POST method, successfully retun the values,

After receiving the post data how can i convert to display like a table.



workout:



fetch_data.php return values.

https://snag.gy/IASCMZ.jpg

& values received

https://snag.gy/ojWxHe.jpg

Here is my my_cart.php :

Expand|Select|Wrap|Line Numbers
  1. // FYI -> Here i am using only two fields :  voice_sku & voice_name 
  2.  
  3. <table width="100%" cellpadding="6" cellspacing="0">
  4.  <thead>
  5.  <tr>
  6.  <th>Voice Sku</th>
  7.  <th>Voice Name</th>
  8.  <th>Remove</th>
  9.  </tr>
  10.  </thead>
  11.  
  12.  <tbody>
  13.  
  14.  <?php
  15.  session_start();
  16.  $voice_sku = '';
  17.  $voice_name = '';
  18.  
  19.  if(isset($_POST['voice_sku'])&& isset($_POST['voice_name']))
  20.             {
  21.  // print_r($_POST);
  22.  // die();
  23.  
  24.  $voice_sku = $_POST['voice_sku'];
  25.  $voice_name = $_POST['voice_name'];
  26.  $_SESSION['voice_sku'] = $voice_sku;
  27.  $_SESSION['voice_name'] = $voice_name;
  28.  
  29.  
  30.             }   
  31.  var_dump($_SESSION);    
  32.  ?>
  33.  
  34.  <tr>
  35.  <td colspan="5">
  36.  <span style="float:right;text-align: right;">
  37.  <!--  -->
  38.  </span>
  39.  </td>
  40.  </tr>
  41.  <tr>
  42.  <td colspan="5">
  43.  <a href="index.php" class="button">Add More Items</a>
  44.  <button type="submit">Update</button>
  45.  </td>
  46.  </tr>
  47.  
  48.  </tbody>
  49. </table>
  50.  
Jul 10 '19 #1
0 1001

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1303
by: Anders Jansson | last post by:
Hi! I'm porting an ASP application to ASP.NET 1.1 and having problems with accessing Session values in ASP that were created and initialized in ASP.NET 1.1. For example, I added a variable in...
0
1493
by: Patrick Olurotimi Ige | last post by:
I want to insert checkbox Y/N or 1/0 into a SQL table. I know i can do that using a bit field or Char field. My Question is i have Datalist that lists products and i want to put this checkBoxes...
9
2533
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
4
929
by: ruca | last post by:
Hi, I have a question for you all... I have two pages, where one it's for user fill some fields information and the second page ia a confirmation page. Here I have a problem, I'm using...
1
1588
by: juan | last post by:
Hello, I am new in Perl programming and I have to do some application quick. What I need is to do a telnet to a machine, this machine is sending continously values in columns with a format...
5
2135
by: Mirovk | last post by:
The onclick action associated to my form´s radio buttons call to a vbscript were the session values are changed, this happens correctly but with the onclick action associated to my continue button...
3
1937
by: Sylvie | last post by:
When redirecting a page, For example CASE 1; Response.Redirect("Page.aspx?Paramval=123"); in Page.aspx
1
1841
by: daniel.westerberg | last post by:
Is it possible to keep sessions between subdomains? I.e If I have a site "shop.com" and when user acess his personal page it's "secure.shop.com" Is it possible to share the session values between...
1
2102
by: selvamsivalingam | last post by:
i call the popup window through javascript by using the below code. <script language="javascript"> function hpclick() { var WinSettings =...
2
2902
by: ksrashmi | last post by:
HI i want to transfer url from the http to https in shopping cart t lossing session . is it possble to do this .
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7371
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.