The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Troubles when making a register form - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Troubles when making a register form (/showthread.php?tid=729) Pages:
1
2
|
Troubles when making a register form - JulienS - 09-08-2017 Hi, I'm having troubles when I want to adapt your code for my website. Everytime I get either 'Token doesn't match' or several errors: Notice: Undefined index: username in /Applications/MAMP/htdocs/igloo-new/users/classes/Validate.php on line 35 Notice: Undefined index: username in path/users/classes/Validate.php on line 35 Notice: Undefined index: password in path/users/classes/Validate.php on line 35 Notice: Undefined index: password in path/users/classes/Validate.php on line 35 Notice: Array to string conversion path/login.php on line 100 Notice: Array to string conversion in path/login.php on line 100 This is my code: <pre> Code: <form action="login.php" class="login-landlord" name="login-landlord" method="post"> I just copied the rest. Thanks for your answers! Troubles when making a register form - Brandin - 09-08-2017 Can you paste your whole file at a site such as hastebin, pastebin or pasted.co? Thank you. Troubles when making a register form - JulienS - 09-09-2017 Sure, this is the link : http://pasted.co/16ba787d Troubles when making a register form - mudmin - 09-09-2017 We need the entire login.php file pasted. I can't see in this where you're doing any validation. I do notice that you did not give your email and password form fields name attributes. They should be name="username" and name="password" if you want to be able to "grab" them when you're processing the form. Troubles when making a register form - JulienS - 09-09-2017 http://pasted.co/fd5abeea. I corrected what you told me, now it just reloads the page Troubles when making a register form - mudmin - 09-09-2017 Is this file in usersc/login.php ? a. It should be so we don't accidentally overwrite your changes with an update. b. if so, the require once should be ../users/init.php Making that change, it works for me on userspice 4.2.9 Troubles when making a register form - JulienS - 09-09-2017 No the file is in my root. But I changed the links in init to update them. I also tried with an account not registered, and when it should tell me that this account doesn't exist it just reloads Troubles when making a register form - Brandin - 09-09-2017 @mudmin - where is the token handled/read from? Init? Header? Nav? You can see he isn't calling the header and nav of US in his script - only his own website - could this be the issue? Troubles when making a register form - JulienS - 09-09-2017 I copied everything from the header and nav like it was Troubles when making a register form - Brandin - 09-09-2017 Why is it called so far down then? Normally you call the header and nav after the init... You also have more header stuff in this file. It might be best to copy the form and just have it post to /users/login.php |