Completed

78451 PHP Javascript Script Help

I have a site in which users (within private user accounts) submit data via forms on four different pages. Each page lists a submit button which immediately sends the data entered on that specific page to a MySQL database. Users may move from page to page (and in any sequence, NOT just page 1 -> page 2 -> page 3 -> page 4) using four different links, each of which points to one of the four aforementioned pages. The four links are always visible on each of the four pages, allowing the user to move, for instance, from page 1, to page 3, to page 2, back to page 1, and so on, in submitting data. When users are satisfied with their four-page submission (which they can edit without limit using each of the listed four links), they may simply review their work and logout. My problem is this: some users forget to click the submit button on, say, page 2 before moving to page 4 (or any other page they might then choose to submit data on next). The data just entered is therefore lost (and for security reasons, will not reappear if the user uses a back button), as a submission was never made to the database. I therefore require either a PHP or Javascript script (or combination thereof) to automatically submit a page's form data when a DIFFERENT page link is clicked. So far, I've tried using Onclick and [url removed, login to view]() to automatically send form data when another page link is clicked. However, timing seems to be an issue, as form data is *sometimes* sent to the database before the new page is loaded, but not always. Using "return false" with the above javascript statement *does* always send the data to the database, but does NOT navigate to the page link clicked by the user. I need a solution that fits into our existing code scheme (use of a PHP function, even if using Javascript in some capacity would be perfect). Please feel free to message me if I can provide any more information about this needed script. In short, I need a script that automatically submits form data when a user leaves a page without clicking the page's Submit button, and for this script to work within existing code structure.

Skills: Anything Goes, Javascript, PHP

See more: uses of data structure, statement problem, statement of a problem, specific problem statement, review javascript, problem of points solution, lists data structure, javascript edit code, data structure uses, data structure solution, data structure problem, choose help, button onclick php, javascript to edit page, javascript page edit, edit page javascript, short script, php javascript, php function , help me move

About the Employer:
( 194 reviews ) Missoula, United States

Project ID: #1825730

Awarded to:

squarehosting

Hi, this will not be difficult. The form just needs to submit which pages should be loaded next and PHP can take care of the rest. Thank you

$20 USD in 1 day
(0 Reviews)
0.0