rashidpathiyil Posted October 11, 2015 Share Posted October 11, 2015 How to create action page to fill # action="#" HTML Form code 1: <form action="#" class="contactForm" method="post"> <input class="required" type="text" name="name" placeholder="Name"> <input class="required" type="email" name="email" placeholder="Email"> <textarea class="required" name="textArea" placeholder="Message"></textarea> <input id="conSubmit" type="submit" name="submit" value="Submit"> </form> HTML Form Code 2: <form id="subscribeForm" action="#" method="post" class="subscribeForm pull-left"> <input id="subEmail" type="email" name="email" placeholder="Enter your e-mail"> <input id="subSubmit" type="submit" name="submit" value="Subscribe"> <div class="clearfix"></div> </form> Quote Link to comment Share on other sites More sharing options...
scootstah Posted October 11, 2015 Share Posted October 11, 2015 You create an "action.php" file. And then you use $_POST to get the data. Quote Link to comment Share on other sites More sharing options...
valandor Posted October 11, 2015 Share Posted October 11, 2015 I would suggest looking at filter input and the types of filters it has out of the box. Remember to never retrieve data from $_POST or $_GET as they are deprecated. Always validate and sanitize your data. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 11, 2015 Share Posted October 11, 2015 Remember to never retrieve data from $_POST or $_GET as they are deprecated. I didn't receive that memo 2 Quote Link to comment Share on other sites More sharing options...
benanamen Posted October 11, 2015 Share Posted October 11, 2015 @valandor, speechless! Thanks for the LOL! Quote Link to comment Share on other sites More sharing options...
scootstah Posted October 11, 2015 Share Posted October 11, 2015 Remember to never retrieve data from $_POST or $_GET as they are deprecated. You're probably confusing $_POST with $HTTP_POST_VARS, which is deprecated. $_POST and $_GET themselves are not deprecated. Grabbing data directly from $_POST or $_GET is fine in most cases, as long as you sanitize/escape before you use it elsewhere. You can't just fetch your data from a single filter_input at all times, because sanitation is a contextual thing. What makes sense for one system might not make sense for another. For example, SQL injection makes no difference when outputting to HTML, and XSS makes no difference when saving to a database. Quote Link to comment Share on other sites More sharing options...
rashidpathiyil Posted October 12, 2015 Author Share Posted October 12, 2015 You create an "action.php" file. And then you use $_POST to get the data. yes, the problem is that, i don't know to "create.php" file, i don't know to write code $ POST. Please help me,if you know to make this file for my 2 Forms. Quote Link to comment Share on other sites More sharing options...
benanamen Posted October 12, 2015 Share Posted October 12, 2015 (edited) We know how to make it. But we are not going to do it for you. You need to go study some tutorials and learn the basics. You're not ready to ask for help yet. Edited October 12, 2015 by benanamen 1 Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted October 12, 2015 Share Posted October 12, 2015 rashidpathiyil, your question, How to Create a "action.php" page for HTML Form?, isn't a programming problem. it's a research question based on a lack of knowledge. research questions are things you need to take care of yourself in order to learn enough about a subject so that you can make the attempt at performing a task. a programming problem, which is what programming help forums are for, are what you have after you have written some code and you have a problem or error with it that you cannot solve yourself (though too many people just dump their code on help forums without first making any attempt to learn and fix it themselves.) the www was created for researching information. php was created primarily to process form submissions. there are several 100's of thousands of php form processing examples posted on the www that you can examine to learn the basics of How to Create a "action.php" page for HTML Form. 1 Quote Link to comment Share on other sites More sharing options...
rashidpathiyil Posted October 12, 2015 Author Share Posted October 12, 2015 rashidpathiyil, your question, How to Create a "action.php" page for HTML Form?, isn't a programming problem. it's a research question based on a lack of knowledge. research questions are things you need to take care of yourself in order to learn enough about a subject so that you can make the attempt at performing a task. a programming problem, which is what programming help forums are for, are what you have after you have written some code and you have a problem or error with it that you cannot solve yourself (though too many people just dump their code on help forums without first making any attempt to learn and fix it themselves.) the www was created for researching information. php was created primarily to process form submissions. there are several 100's of thousands of php form processing examples posted on the www that you can examine to learn the basics of How to Create a "action.php" page for HTML Form. We know how to make it. But we are not going to do it for you. You need to go study some tutorials and learn the basics. You're not ready to ask for help yet. Ok guys, Quote Link to comment Share on other sites More sharing options...
scootstah Posted October 12, 2015 Share Posted October 12, 2015 https://www.codecademy.com/tracks/php Start here. 1 Quote Link to comment Share on other sites More sharing options...
benanamen Posted October 12, 2015 Share Posted October 12, 2015 @scootstah, Excellent starting point. @rashidpathiyil, Stop crying and go through that tutorial as well as the one for HTML & CSS https://www.codecademy.com/tracks/web How to make a website https://www.codecademy.com/skills/make-a-website and when your down on all that, the SQL tutorial https://www.codecademy.com/courses/learn-sql After you understand all that, your likely to come back providing answers for people rather than asking for answers. Code on my brutha! Quote Link to comment Share on other sites More sharing options...
valandor Posted October 12, 2015 Share Posted October 12, 2015 (edited) You're probably confusing $_POST with $HTTP_POST_VARS, which is deprecated. $_POST and $_GET themselves are not deprecated. Grabbing data directly from $_POST or $_GET is fine in most cases, as long as you sanitize/escape before you use it elsewhere. You can't just fetch your data from a single filter_input at all times, because sanitation is a contextual thing. What makes sense for one system might not make sense for another. For example, SQL injection makes no difference when outputting to HTML, and XSS makes no difference when saving to a database. I was thinking of HTTP_POST_VARS ... Never answer questions on a heavy dose of meds is a good side note of this. I usually create helper classes to sanitize and validate my data depending on what I'm doing with it. I usually suggest to use the filter_input methods if a question is vague. This will at least get someone on a path of sanitizing and validating their data prior to doing anything with it. To many times I've seen people who take form data and save it right to a database because they followed some basic online tutorial that doesn't give any kind of security advice along side the basic how to. Thank you all who pointed out my mistake, and I'll try to remember my meds alter the state of my mind and I shouldn't try to answer questions shortly after taking them again Edited October 12, 2015 by valandor Quote Link to comment Share on other sites More sharing options...
benanamen Posted October 13, 2015 Share Posted October 13, 2015 @valandor, How about we alternate. You take your meds, I answer questions, I take your meds, you answer questions. The cops show up, we dont answer any questions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.