PHP: easy basic beginner tutorial for Post, Button, and SELF use
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PHP: easy basic beginner tutorial for Post, Button, and SELF use
Hello,
If you would like to learn the most basic use of file creation, file append, post, and button on a single SELF page, you can maybe benefit of this easy basic beginner tutorial for Post, Button, and SELF use.
A friend of mine asked me to make him a small page on the web.
It allowed me to make it easy for beginners and available for students and education purpose.
Please remember that the Programming forum is for receiving answers to programming questions. As this post is intended to share an idea rather than seek an answer, I am moving it to the General forum where it will be seen by a more general audience of members and guests.
Please remember that the Programming forum is for receiving answers to programming questions. As this post is intended to share an idea rather than seek an answer, I am moving it to the General forum where it will be seen by a more general audience of members and guests.
// I may believe that programming section of LQ might be better adapted, especially for programmers seeking examples.
char *astrovar="astrogeek";
I may believe that programming section of LQ might be better adapted, especially for programmers seeking examples.
That is correct, the Programming forum is the place for those seeking help and examples. This post does not fit that description.
It is not a repository of everyone's personal examples offered without context.
I think it is great that you want to share your own learning experience and example code, but I would suggest that your blog space here on LQ might be a more appropriate place to post your examples and tutorials when not offered in response to the questions of others. Doing so provides a level of personal organization and continuity of thought not appropriate within the forums.
Code:
/* Just trying to point you in the right direction */
struct right_direction {...};
struct right_direction *Xeratul;
Last edited by astrogeek; 05-26-2017 at 06:51 PM.
Reason: seeking help and examples
Since you imply a request for feedback, two concerns:
If the plan is to use it as a positive example of PHP, it should probably address the concept of tainted data and explicitly address the matter of data validation before exposing any user-provided input to the system or the user. This is probably covered by use of the function htmlspecialchars(), but it is important enough to point out in some inline comments and maybe make a bigger deal out of what is happening with the user-supplied data.
Second, you are inadvertently including a lot of unnecessary JavaScript. At least it is present there in the buttons. This greatly weakens security and accessibility but if nothing else distracts from what should be the single focus: PHP. So the OnClick attributes accidentally included in the button elements should be removed. Buttons should always be inside a form element, anyway.
Last edited by Turbocapitalist; 05-26-2017 at 07:59 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.