ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I put the notices on because the script isn't working. When I put information into the form it gives the error because the values aren't being written to the index in the array and I cant figure out why?
Actually it is working. The variable does not exist until you press the form submit button. As stated setting display errors to 0 will not print the error to the screen.
I'm saying I've ran the script with putting information into the fields and pressed submit and its not printing the value for name that I put in there, its giving me the error instead.. Removing this just prints nothing..
Browsers like HTML attributes with double quotes. Bugs are known to occur without quotes and with single quotes.
Here, $name is either the "name" variable from POST, or null. @ suppresses the warning if "name" does not exist in $_POST.
Beware of nasty input. $safename is the "name" variable with special characters and double quotes converted to entity references; the result can be used anywhere in HTML.
If you were to save $name to a database or a file, use appropriate escaping functions to $name. When reading from a database or file, first do the converse de-escaping, then derive $safename using htmlentities() or something similar. Use $safename everywhere in HTML output.
I still couldn't get this to work, I was using lighttpd and I'm guessing it was the problem because when I installed apache everything just the way it was before worked this time. Thanks for all the help!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.