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
45
Other forums
This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the
why isn't this PHP code working ???
it's suppose to find a name on the database.
<?php
$s = $_POST["lname&
PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi
Multiple PHP errors when clicking a link..and..removing a ghost..
Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving.
shift numbers with paging
Hi
How would i be able to display 10 numbers 1 2 3 4 5 6 7 8 9 10
and when I click next
UDP Multicast question
Hey,
Im not really in the know when it comes to network related programming and activitie
Perplexing problem showing a .jpg
Please disregard..........I figured it out
Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:
-Da
Custom list order
Hi there,
I have checked this tutorial and it's great till the point where I want to display
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_