php - Splitting code accross two files that both require form data -


i'm trying avoid php script becoming big , plan create file related tasks. problem values submitted in form required in both , i'm not sure best approach share data is.

after user registers form data submitted process.php adds data database , checks duplicates. i'm adding e-mail verification. want e-mail verification in it's own file, call verify.php. since both process.php , verify.php require data submitted form (e.g. username, e-mail address) what's best way share data? here possible solutions thought

  1. have form submit both process.php , verify.php (not sure if possible)
  2. have process.php include verify.php
    • in php automatically include variables $_get , $_post process.php?
  3. after process.php finishes use redirect header go verify.php , somehow pass form data

generally speaking should including files avoided?

store form data in $_session , set expire after given time period.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -