473,487 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why a blank page??


I have a problen getting some information to display on my internet
store's web page.

Normally, to view the store's shopping cart the user
clicks the "View Cart" button. If there are any items in
the cart with his/her alloted cartId, those items are
displayed in a formatted display. It works fine (see 'does display'
below).

If a user clicks the "Add to Cart" button displayed with
any product I want to display the cart immediately after the
product has been added.

However, the product item gets added to the cart OK, but the
"pageContentsCell" is blank. (see 'won't display' below).

Can anyone see where I'm going wrong???

************************************************
<?php
$departmentId = null;
$categoryId = null;
$searchString = null;
$addProdId = null;
$cartId = getCartIdFromCookie();

// if adding a product to the cart
// make sure we have a valid cartId
if (isset($_GET['PId'])) {
$addProdId = $_GET['PId'];
if (!$cartId) {
$cartId = getNewCartId();
setCartIdCookie($cartId);
}
} else {

..... other conditions ....
}

html_header();
?>
........

code and html for title, menus, etc

........

</tr>
<tr>
<td id="pageContentsCell">
<?php
// All code for the content area goes in here
if ($addProdId) {
addItemToCart($cartId, $addProdId);
displayShoppingCart($cartId); // <- won't display!!!
} else if (empty($_GET)) {
// first page
displayFirstPage(24);
} else if (isset($_GET['viewCart'])) {
if ($cartId) {
displayShoppingCart($cartId); <- does display!!!
} else {
displayEmptyCart();
}
......
other conditions...

......
?>

closing html

************************************************

Feb 11 '07 #1
1 1671
Hi,

Not sure why this is happening. You could add some debugging messages
to displayShoppingCart or addItemToCart to see what might be going
on. Maybe it's exiting before that point or encountering an error?

I would set error_reporting(E_ALL) if necessary to check if there's
some unexpected conditions.

Feb 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5077
by: dmcconkey | last post by:
Hi folks, I have a client with four websites. Each site has a contact form that is identical. They all have "required" fields validated through a JavaScript onSubmit() function. Upon validation,...
2
3259
by: Ravi | last post by:
I have a webpage(with a text field and a button) which prompts for a local file and attempts to load the file in the window if the user clicks on the button. The javascript code onClick event uses...
2
1391
by: Michael | last post by:
All, I have a form send a variable to another page. Based on the variable the page will show a different image. I.E. <form METHOD="POST" ACTION="http://mysite.com/photo.htm"> <input...
14
2597
by: charlie_M | last post by:
Is there a way to blank the screen in a FORM's onsubmit=... to blank the screen for the user?? I asked this before and got a way to blank a table by id with ...
6
5500
by: Melissa | last post by:
Does anyone have a generic procedure for adding blank lines to reports like Sales details, PO details and/or Orders details. The procedure would need to count the number of line items, determine...
4
10927
by: Nhmiller | last post by:
Access seems to always generate a second page, which is blank, to my one page report. How do I delete the second page? Thanks. Neil Cat Paintings At Carol Wilson Gallery...
6
4676
by: noway | last post by:
I have greated a report and have included a page break in it. The report breaks were it is supposed to but then it creates a blank page between the two pages. Since this report will print out...
3
9140
by: Wayne | last post by:
I have a report containing 2 subreports. The subreports each contain a chart. The whole thing easily fits on one page but a second blank page is consistently being generated. This has nothing...
1
2256
by: siomay87 | last post by:
please help i have a problem in the ms access reporting, my report have: page header, detail, page footer and report footer In listing "detail section", the number of line is depend on the data...
4
3071
by: sid | last post by:
"about:blank" oepns new browser window I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. ...
0
7105
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
6967
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...
0
7132
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,...
0
5439
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
4870
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
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
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...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.