PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I Could use some help on a PHP project. I'm a bit new to PHP and I'm currently building a registration/login form. Now here's what I have to detect if the user as filled out all the necessary values:
The array is located in an included file called english.php. Now here's what I'm having problems with, I want $msg to display all the errors stored to it. Meaning if a user doesn't enter a username and doesn't enter a password I want it to return both those values but the way it is now, it only stores the latter value. My question is how I can store and display 2 different variables. Or atleast point me in a direction on how to go about doing so. Thanks in advance.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
That worked exactly how I needed it to, thank you Everah. My formatting is horrible I know, is there a common site that states rules for php formatting?
No, that is one of the 'joys' of PHP... how lose it is. There are several published standards out there, and I am not going to reignite the fires of the past flame wars on this subject by giving you any direction as to how you should go with it. I will say this, pick a standard and code by it. Find one you are comfortable programming in, and stick with it regardless of what anyone tells you (just so long as it works... and you are not developing for a team that has a standard different than yours).