hi group!
I am new to PHP and so far managed to find my answers by searching
this group instead of posting repeating questions, but I don't know
what to search for to get answer to this question:
I want to sell pin numbers.
I have a script called display.php that gets a pin number from MySQL
database table, displays it in the browser and deletes the row it got
that pin from in the database table.
To get to that, the user has to go through a credit card verification
script getpaid.php, which contacts the bank and confirms that the card
has available funds and then runs my display.php and tells it via POST
that it is ok to display the pin number. If the script is run directly
by typing its address in the browser, it will redirect the user to
getpaid.php because it won't have the required POST data passed to it.
The problem is that after the user gets the pin from display.php and
refresh the page, the script will run again and as the value that has
been sold first time has already been deleted, it will take the next
pin number in the database and display it to the user again. That is
something I don't want to happen. I want the user to get the same pin
number that it got the first time every time they refresh the page.
The only solution I can come up with is to generate randomly named
html document with the pin number, something like
ipwhf2ji3op5wls j7vxz.htm and relocate the user's browser to that
document. Does anyone can advise me with a better solution?
I am new to PHP and so far managed to find my answers by searching
this group instead of posting repeating questions, but I don't know
what to search for to get answer to this question:
I want to sell pin numbers.
I have a script called display.php that gets a pin number from MySQL
database table, displays it in the browser and deletes the row it got
that pin from in the database table.
To get to that, the user has to go through a credit card verification
script getpaid.php, which contacts the bank and confirms that the card
has available funds and then runs my display.php and tells it via POST
that it is ok to display the pin number. If the script is run directly
by typing its address in the browser, it will redirect the user to
getpaid.php because it won't have the required POST data passed to it.
The problem is that after the user gets the pin from display.php and
refresh the page, the script will run again and as the value that has
been sold first time has already been deleted, it will take the next
pin number in the database and display it to the user again. That is
something I don't want to happen. I want the user to get the same pin
number that it got the first time every time they refresh the page.
The only solution I can come up with is to generate randomly named
html document with the pin number, something like
ipwhf2ji3op5wls j7vxz.htm and relocate the user's browser to that
document. Does anyone can advise me with a better solution?
Comment