Timeline for Creating a WordPress form with a PHP script and default header
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Nov 25, 2019 at 14:17 | history | suggested | Peter Mortensen | CC BY-SA 4.0 |
Copy edited (e.g. ref. <http://en.wikipedia.org/wiki/WordPress>, <http://en.wikipedia.org/wiki/PHP>, and <http://en.wikipedia.org/wiki/HTML>). Removed meta information (this belongs in comments).
|
Nov 25, 2019 at 13:25 | review | Suggested edits | |||
S Nov 25, 2019 at 14:17 | |||||
Oct 7, 2016 at 13:29 | answer | added | Tom J Nowell♦ | timeline score: 4 | |
Oct 6, 2016 at 16:16 | comment | added | Stephen Rose | So Step 1 of my form, which is html, calls a php file when the Submit button is clicked. The php file executes and collects the data from Step 1 of the form and writes it to a MySQL database. My original plan was to have more code in the php file to create Step 2 of the form, but you are saying I could embed a shortcode in a wordpress page which references a Step 2 php file? My question is how does the Step 2 php file get the data that was collected in the first php file? It gets it from the MySQL database? | |
Oct 6, 2016 at 15:22 | comment | added | user104130 |
Why can't you just create a shortcode of the php file and include it in a page by echo do_shortcode('[my-php-code-shortcode-1]'); . In that case you will get both header and footer already included by default.
|
|
Oct 6, 2016 at 15:17 | comment | added | Stephen Rose | Then what is the approach to creating a complicated form that accesses the MySQL database in multiple steps to create the form questions and answers? | |
Oct 6, 2016 at 14:53 | comment | added | Tom J Nowell♦ | You shouldn't be creating PHP files in your plugin/theme that the browser accesses directly, it's a security risk and greatly complicates development introducing lots of new problems. Everything should go through WordPress | |
Oct 6, 2016 at 14:52 | history | edited | Tom J Nowell♦ | CC BY-SA 3.0 |
added 18 characters in body
|
Oct 6, 2016 at 14:15 | review | First posts | |||
Oct 6, 2016 at 16:23 | |||||
Oct 6, 2016 at 14:11 | history | asked | Stephen Rose | CC BY-SA 3.0 |