PHP Function Page Advice


Posted on 16th Feb 2014 07:03 pm by admin

Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and education)

It uses MySQL for the Shop Item Data and a 'Username.txt' file for each users cart. (Formated as 'ItemID1xQty1, ItemID2xQty2' etc....

Did you know?Explore Trending and Topic pages for more stories like this.
From the Cart View window, the user can edit the Quantity (Form text field).
When the 'Update Cart' Form button is clicked, a Javascript function;
re-calculates the monetry valuesdisplays the changesCreates a String containing the new cart dataCalls a PHP page (cart_update.php), that writes the Data to the UserName.txt file
This all works fine, except......
cart_update.php needs to do it's stuff and close. - But it doesn't close so the user is left with a blank window that has to be closed manually.

The cart data is posted from hidden form elements to cart_update.php.
using javascript to close the window results in the 'Do you want To Close this Window' message..
using JS History or $_SERVER['HTTP_REFERER'] refreshes the Cart View window to its pre-edited state

Is there a way round this..?
Can I put the cart_update.php code somewhere other than a .php page?

So close but so far..

Any help will be greatly appreciated..
No comments posted yet

Your Answer:

Login to answer
294 Like 45 Dislike
Previous forums Next forums
Other forums

Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.

I have maxminds geoip lite installed and i

Loosing changed contents when used FM REUSE_ALV_GRID_DISPLAY
Hi,

I have used FM REUSE_ALV_GRID_DISPLAY in my program as below.

CALL FUNCT

Must be a string? Huh, what? HELP?
with the following script, I get
Fatal error: Property name must be a string in /home/content/e/

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:
"a.b.c.d.e.f&

How to add advertisment on top of videos
Hello,
I was told that i should find the answer for this problem in this forums.
I searched a

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

javascript in php code causes page to display white
Hi All,

Odd one this, I've got the following code (below) which is a simple log in form. The

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash