QUESTION html form with post method - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: QUESTION html form with post method (/showthread.php?tid=6788) |
html form with post method - pewu - 2014-09-30 Hello and sorry for the simple question. I am a newbie so ... Can anyone suggest me how to create my own form? I have code : Code: <form id="form" name="form_name" action="#" method="POST"> Where can I use '$_POST['sth']' in GS? Do I have to create a plugin? Any ideas, tutorials or manual guides ? Thx RE: html form with post method - pewu - 2014-10-01 ok ... i think i have found... Custom URL (Slug) + exec-php RE: html form with post method - beaksdale - 2014-10-08 I am having a problem along these lines, I have a simple contact form on my website that I am unable to process as when I submit it the $_POST array is empty. Here is the code for the form Code: <form action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'] . "?id=" . return_page_slug()); ?>" enctype="text/plain" method="post"> I'm at a loss as to what the problem is can anyone help me? Cheers RE: html form with post method - shawn_a - 2014-10-08 My guess is there is a redirect occurring before your code runs, so you are losing the data. learn how to use your browsers development tools to inspect the headers etc. chrome F12 RE: html form with post method - beaksdale - 2014-10-08 (2014-10-08, 00:48:42)shawn_a Wrote: My guess is there is a redirect occurring before your code runs, so you are losing the data. Thanks for the suggestion. I've looked at Chrome's developer tools and while I couldn't work out if it was redirecting I did notice that it wasn't being treated as form data but request payload, which was because I was using enctype text/plain for the form instead of the default. RE: html form with post method - shawn_a - 2014-10-08 interesting, never even noticed that |