/    Sign up×
Community /Pin to ProfileBookmark

Help with using HEADER() to POST variables

Hi,
I have a data entry page that is used to record match results between two players. The result is entered into a database in 3 stages:
Stage 1: Select Player names
Stage 2: Enter score
Stage 3: Store data into database.

I need to validate that the score was correctly entered by the user, and if not it, return the user to the same form (Stage 2) [b]with the player names already set[/b]. (Thus avoiding the need to enter them again.)

Since the present code is based on FORM POST, if the data is wrong, I need to redirect back to the page with the Player Names as POSTed variables.

Can anyone help me with some sample code showing how to use the HEADER() function to setup the header to include POSTed variables and perform the redirect?

Cheers,
Nap

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Nap spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...