WendyB Posted May 21, 2010 Share Posted May 21, 2010 I have a very strange problem with a login form. A customer (of a customer) can't login using the following form: <form name="form_login" method="post"> <div id="inlog-formulier"> <form action="/mijn-account/" method="post" name="form_login"> <div id="e-mailadres"> E-mailadres: <input name="user" id="emuserail" type="text" value="E-mail" onfocus="if(this.value=='E-mail')this.value='';" /> </div> <div id="wachtwoorddiv"> Wachtwoord: <input name="passwd" id="passwd" type="password" value="Wachtwoord" onfocus="if(this.value=='Wachtwoord')this.value='';" /> </div> <div id="div_login"> <a href="javascript:void(0)" onclick="document.form_login.submit()">Log in !</a> </div> <div id="geeninloggegevens"> <a href="/aanmelden/">Nog geen inloggegevens?</a> </div> <input type="hidden" name="login_cmd" value="login" /> <input type="hidden" name="current_url" value="/mijn-account/" /> </form> </div> A problem is that i can't try the error because on every computer and OS i try it simply works. What i understand from what the customer describes is dat the field "login_cmd" is not submitted, or no field at al. But after clicking the link it is actually going to the "action" url. One user is using IE8 in Vsta and the other IE8 on Win 7 Until a few days ago there was a not working cookie system for autologin, but i have switched it off. So the browser sends the cookie, but it's not read by PHP. I put this in the HTML forums, because i thought it not to be a PHP problem. Thanks in advance for your comments. PS. maybe submitting a form like this is not the most beautiful way, but the designers i cooperate with like this method. edit: forgot to tell: I also tested with IE8 on Vista and Win 7 but can't find any problem Quote Link to comment Share on other sites More sharing options...
xcoderx Posted May 23, 2010 Share Posted May 23, 2010 looks all fine other than i dont know how u made the javascript functions Quote Link to comment Share on other sites More sharing options...
WendyB Posted May 25, 2010 Author Share Posted May 25, 2010 i have not used any custom Javascript functions. All the used Javascript is in the shown code Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted May 25, 2010 Share Posted May 25, 2010 You have multiple opening <form > tags. That is invalid HTML. Quote Link to comment Share on other sites More sharing options...
WendyB Posted May 25, 2010 Author Share Posted May 25, 2010 You have multiple opening <form > tags. That is invalid HTML. You are absolutely right. I now see it. But it's happened when copying and pasting on this forum and it's not on the problematic site. By the way: today i put a basic temporary form on the site with exact the same input names and this one works for the customer. So the problem is not on the PHP side. The problematic website is at www dot stoppenmetroken dot com (can't use a link because it would interfere with SEO) Quote Link to comment Share on other sites More sharing options...
WendyB Posted May 27, 2010 Author Share Posted May 27, 2010 Today i got mail from two customers telling me the problem is solved. I'm not sure what exactly solved it. I have done some minor changes which i tought could be the issue. Like putting session_start inside a ob_start, changing the form name from 'login' to something more specific to avoid any id-clashes and putting the link with submit() outside the form element. I think the latter has done it. Anyways, it works now. Thanks for your replies. 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.