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....

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

Displaying returned XML in another PHP page
I have an online payment form that will return XML given if a payment is successful or declines. I

Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.

I have images like this:

How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else

I can give them an F

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

Simple PHP/Java Help..
Hi,
I'm trying to build a little program to do with calculating postage. Unfortunately i haven't

Delete Client 066 Earlywatch
Hi all,

in former times client earlywatch was required for SAPs remote access to SAP inst

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

I am stumped
OK. Here is what I am trying to do. I have the conditions set, and if the conditions are met, I want

Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

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