09-09-2017, 03:49 PM
I copied the code of header and nav in my header, just adapted everything...
The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.18 (Linux)
|
Troubles when making a register form
|
09-09-2017, 03:49 PM
I copied the code of header and nav in my header, just adapted everything...
09-09-2017, 04:33 PM
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
09-12-2017, 07:19 PM
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...
09-12-2017, 07:32 PM
Are you including
Code: head.php Code: header.php Code: header.php
09-12-2017, 07:40 PM
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 |