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-09-2017 I copied the code of header and nav in my header, just adapted everything... Troubles when making a register form - mudmin - 09-09-2017 The token should be generated in the form itself and read in the $_POST section. The class itself is auto-instantiated in the init. Ok. So let's take a step back. There's a "proper" way to do this that will allow us to help you and make sure our updates don't break your system. Step 1. Don't modify anything in the users folder. Leave that alone. We've worked super hard to make sure it's not necessary to change anything there. Maybe the login links in the navigation or something like that, but no "real" editing. To be honest, I think if I wanted ABSOLUTE compatibility, I wouldn't even change the login links. I would create a login.php in usersc and put <?php require_once '../users/init.php'; Redirect::to('../login.php'); This lets you leave EVERYTHING alone and won't have compatibility options. Step 2. You're absolutely fine putting your login file in the root. In fact, if I take your paste here http://pasted.co/fd5abeea and create a login.php file in the root, it works fine for me. Step 3. If that paste doesn't work for you... go back and revert any core userspice files you changed because you probably broke something. Note that my paste from you didn't have your header and footer stuff. See the screenshot... http://puu.sh/xvC01/7517444e95.png So, if you revert your files and are still having a problem, then your problem is in the header/footer files that you created (which weren't loaded on my system). Try commenting those out until you can login and that will point you to where your problem is. Step 4. Includes. When you're doing include/require once, we have some magic urls that are available to you. A require once should look like this Code: <?php require_once $abs_us_root.$us_url_root.'users/includes/header.php'; ?> These are little nit picks, but if you start doing things this way, your life will be INCREDIBLY easier down the road when you try to upgrade and when you want help in the forums. And as always, I tell newbies with userspice to check out this video on dealing with the database... https://www.youtube.com/watch?v=rb0kD5tCENM Troubles when making a register form - JulienS - 09-12-2017 I tried <?php require_once $abs_us_root.$us_url_root.'includes/head.php'; ?> to include a part in users/join.php but the page is just blank... Troubles when making a register form - karsen - 09-12-2017 Are you including Code: head.php Code: header.php Code: header.php Troubles when making a register form - JulienS - 09-12-2017 I'm trying to include a page called head.php, it's all the part before <!DOCTYPE html>. It works well on my index page, but when I put it on the users/join.php it doesn't work. What I want to do is to make all my pages starting like this: http://pasted.co/4dd2ff6c. It works well on the index page, but not on other pages. Page head.php: http://pasted.co/4e404c3d Page header.php: http://pasted.co/fec196e7 |