Sprout Posted June 23, 2010 Share Posted June 23, 2010 I'm extremely new to PHP and imagine I'm going to quickly become a regular on here. I'm trying to learn to create a member's login. I've taken a few tutorials to learn MySQL, PHPMyAdmin etc etc not important. I'm currently building and figuring out/modifying this member script. All is going relatively well until I try to put both a sign in and register form on the same page. The problem is that whenever an error message pops up (like the user leaving a field blank) both forms show the error message. Also, the error message is different depending on which form was clicked but they always show up in the "username" and "password" sections of both forms. Can anybody explain to me why this is or how to fix it? I tried to tinker with it creating two different processing files and messing around in the session.php file but I can't figure it out. I assume they're connected by a common element such as sharing a name or something but I really cannot seem to wrap my head around it. If anybody can explain to me what's happening I'd really appreciate it so I can know how to fix it since I plan to have multiple forms on other pages too. On top of that it's also causing formatting issues which I don't understand why, but I'll figure that out on my own after I learn how to disassociate the form errors from each other. I can fill out both forms no problem, I just can't make any errors when doing it or everything goes wrong. Thanks in advance to anyone who helps me figure this out. Quote Link to comment https://forums.phpfreaks.com/topic/205676-multiple-forms-and-error-messages/ Share on other sites More sharing options...
Sprout Posted June 23, 2010 Author Share Posted June 23, 2010 I don't know how clear a picture I've painted as to what's going wrong, if anybody needs some clarification as to what I'm talking about please just let me know. Quote Link to comment https://forums.phpfreaks.com/topic/205676-multiple-forms-and-error-messages/#findComment-1076313 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.