|
by: Håvard Olerud Eriksen |
last post by:
I've been working on a webshop, and I've got most of the functionality up
and running. One problem, however, that I don't seem to be able to solve is
as follows. My shopping cart is stored in $_SESSION array. As I need
to keep tabs on what items are ordered and their quantity I add elements
like this:
array_push($_SESSION,array($item => $quantity));
If I add three elements and then var_dump the global variable it spits out:
array(3) { =>...
|
by: Rob Tweed |
last post by:
Probably a simple question but I can't find the answer anyway.
Specifically, is it possible to copy a multidimensional array into the
$_SESSION array - ie a deep clone of all keys and data?
I naively assumed that
$_SESSION = $myArray ;
would work but it doesn't appear to work. Is there a single function
|
by: Phil Powell |
last post by:
What is the most standardized method of utilizing the CURL functions
in PHP (version 4.3.2) to be able to retrieve the contents of a remote
URL that happens to be dependent upon $_SESSION for its content
display?
I've tried the following class methods for display and I have most
everything working until I get to a URL that requires $_SESSION:
class Timer extends View {
|
by: Tom |
last post by:
A small problem that has me kinda baffled. This is the situation:
I've set up a self-submitting form FORM.PHP. Once the inputs are
validated, the info gets put in SESSION variables and the script
redirects the user to a review form REVIEW.PHP which displays the info
the user has input and allows them to edit or submit. At the top of
that page, I have the following code:
--- start code ---
|
by: h |
last post by:
I am at my wits end; I can not see A SINGLE THING I'm doing wrong. I've
read every fricking session related doc. I've searched every fricking
group.
NO ONE seems to have had the problem I'm having - and it doesn't make
ANY sense.
I'm running php 4.3.3 on a local server; and 4.3.10 on my isp's web
server.
I've tested this on both with the same results.
|
|
by: Tom |
last post by:
I put together a code that checks for 2 post variables then stores them
in a multi-dim $_SESSION array, something like this:
If ( isset($_POST && isset($_POST) )
{
$_SESSION = $_POST;
$_SESSION = $_POST;
}
The problem was that $_SESSION was being overwritten with
|
by: Michael Windsor |
last post by:
I've been trying to integrate some PHP pages of my own with some
existing code. The details of this are for the support forums for that
code (where I have been asking questions), but I wonder if someone here
can enlighten me as to why the problematic code is having the effect it is.
For reasons I don't know, if the PHP version is 5 or greater,
register_long_arrays is false and $_SESSION exists, the following
statement is executed:
...
|
by: somecrazyguy |
last post by:
Take the following code, one would think that there was absolutely no link between $test and $_SESSION. But if you reload the page, guess what... "After=FAILED". Why? Because for some reason, writing to $test affects the $_SESSION variable $_SESSION.
session_start();
ini_set("session.gc_maxlifetime","3600");
if ($_REQUEST == "1") session_unset();
var_dump($_SESSION);
if (!$_SESSION) $_SESSION = "Test";
echo...
|
by: gm04030276 |
last post by:
hey, i'm basically trying to use php sessions and a bit of javascript to make tabbed browsing within a web page using sessions to store the data of the different opened pages.
Problem: when i unset the first 0 index in the array (ie close the default page) it seems to wipe the other one (can't get it to add more that one anymore) from the array also
the information is held in sub array
$_SESSION
each page has its own array of infomation...
|
by: sharonDonnelly |
last post by:
Hi
Really dumb problem that's got me beat. Can someone help.
The prolem: I'm trying to count the number of times an item has been clicked. There are many items. I want to create a session variable for each item as its clicked, and increment the value held by the session variable by 1 each time that item is clicked. My plan was to allow an item to be selected on one page - when a user selects an item, a numeric value will be passed to a...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|