Aviseringar
Rensa alla

Hjälp med php login.!


Ämnesstartare

Hej!
Jag har gjort detta systemet: http://www.evolt.org/PHP-Login-System-with-Admin-Features

och sedan laggt in allt på mitt one.com konto.
Men! Jag får inte fram main.php filen? Alltså jag ser inte själva login?
Detta kommer upp: http://showganget.se/Login/main.php


   
Citera
Åtta

sabi:

Jag har gjort detta systemet: http://www.evolt.org/PHP-Login-System-with-Admin-Features

Om du gjort det så borde du väl själv kunna lista ut det. [rolleyes]

Du har inte skrivit in dina databasuppgifter i inställningsfilen.


   
SvaraCitera
Ämnesstartare

Första gången jag arbetar med php [cute]
Ok, den filen heteR?


   
SvaraCitera

sabi:

Jag får inte fram main.php filen? Alltså jag ser inte själva login?

Access denied for user 'your_name'@'srv133.one.com' (using password: YES)

Som Åtta sade, du har inte skrivit in dina databasuppgifter.


   
SvaraCitera
Åtta

Använd citeringsfunktionen.

sabi:

Första gången jag arbetar med php [cute]
den filen heteR?

Jag skulle rekommendera att du kollar dokumentationen på hemsidan eller läser den eventuella readmen. Där står det säkerligen.


   
SvaraCitera
Ämnesstartare

Tack! Men vad heter den filen där jag skall skriva in uppgifterna?


   
SvaraCitera

sabi:

Ok, den filen heteR?

Constants.php

/**
* Database Constants - these constants are required
* in order for there to be a successful connection
* to the MySQL database. Make sure the information is
* correct.
*/
define("DB_SERVER", "localhost"); - Så länge one.se inte har angivit annat så skall detta stå kvar.
define("DB_USER", "your_name"); - Byt ut mot ditt användarnamn.
define("DB_PASS", "your_pass"); - Byt ut mot ditt lösenord.
define("DB_NAME", "your_dbname"); - Byt ut mot namnet på den databas du skall använda.


   
SvaraCitera
Åtta

sabi:

vad heter den filen där jag skall skriva in uppgifterna?

Det står på sidan du länkade till.

evolt.org:

Database

All the tables needed for the Login System are written in the file dbtables.sql. You can look at the file and create each table manually or you can just run the file with mysql and it will create all the necessary tables automatically.

constants.php

This file will contain all the constants and important information used by the login system. Here you specify stuff like your database username and password, the admin account name (which will be able to create other admins), visitor timeouts, email options, etc.

<?
/**
* Constants.php
*
* This file is intended to group all constants to
* make it easier for the site administrator to tweak
* the login script.
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 19, 2004
*/

/**
* Database Constants - these constants are required
* in order for there to be a successful connection
* to the MySQL database. Make sure the information is
* correct.
*/
define("DB_SERVER", "localhost");
define("DB_USER", "your_name");
define("DB_PASS", "your_pass");
define("DB_NAME", "your_dbname");

/**
* Database Table Constants - these constants
* hold the names of all the database tables used
* in the script.
*/
define("TBL_USERS", "users");
define("TBL_ACTIVE_USERS", "active_users");
define("TBL_ACTIVE_GUESTS", "active_guests");
define("TBL_BANNED_USERS", "banned_users");

/**
* Special Names and Level Constants - the admin
* page will only be accessible to the user with
* the admin name and also to those users at the
* admin user level. Feel free to change the names
* and level constants as you see fit, you may
* also add additional level specifications.
* Levels must be digits between 0-9.
*/
define("ADMIN_NAME", "admin");
define("GUEST_NAME", "Guest");
define("ADMIN_LEVEL", 9);
define("USER_LEVEL", 1);
define("GUEST_LEVEL", 0);

/**
* This boolean constant controls whether or
* not the script keeps track of active users
* and active guests who are visiting the site.
*/
define("TRACK_VISITORS", true);

/**
* Timeout Constants - these constants refer to
* the maximum amount of time (in minutes) after
* their last page fresh that a user and guest
* are still considered active visitors.
*/
define("USER_TIMEOUT", 10);
define("GUEST_TIMEOUT", 5);

/**
* Cookie Constants - these are the parameters
* to the setcookie function call, change them
* if necessary to fit your website. If you need
* help, visit www.php.net for more info.
* < http://www.php.net/manual/en/function.setcookie.php>
*/
define("COOKIE_EXPIRE", 60*60*24*100); //100 days by default
define("COOKIE_PATH", "/"); //Available in whole domain

/**
* Email Constants - these specify what goes in
* the from field in the emails that the script
* sends to users, and whether to send a
* welcome email to newly registered users.
*/
define("EMAIL_FROM_NAME", "YourName");
define("EMAIL_FROM_ADDR", "youremail@address.com");
define("EMAIL_WELCOME", false);

/**
* This constant forces all users to have
* lowercase usernames, capital letters are
* converted automatically.
*/
define("ALL_LOWERCASE", false);
?>


   
SvaraCitera
Ämnesstartare

[smile]Tack!


   
SvaraCitera
Ämnesstartare

Nu möts jag upp av detta http://showganget.se/Login/main.php ?


   
SvaraCitera
Åtta

sabi:

Nu möts jag upp av detta http://showganget.se/Login/main.php ?

Säker på att du skrivit in dina databasuppgifter? Det där meddelandet betyder att inloggningen på mysql misslyckades.


   
SvaraCitera
Ämnesstartare

Jag skrev in allt rätt, Alltså allt på detta:
/**
* Database Constants - these constants are required
* in order for there to be a successful connection
* to the MySQL database. Make sure the information is
* correct.
*/
define("DB_SERVER", "localhost"); - Så länge one.se inte har angivit annat så skall detta stå kvar.
define("DB_USER", "your_name"); - Byt ut mot ditt användarnamn.
define("DB_PASS", "your_pass"); - Byt ut mot ditt lösenord.
define("DB_NAME", "your_dbname"); - Byt ut mot namnet på den databas du skall använda.


   
SvaraCitera
Åtta

sabi:

Jag skrev in allt rätt, Alltså allt på detta:

Du vet att dina inloggningsuppgifter på one.com och databasuppgifterna inte nödvändigtvis är samma?


   
SvaraCitera
Ämnesstartare

skall man ha samma inloggninguppgifter som på one?


   
SvaraCitera
Ämnesstartare

Jag addade trollsved2@hotmail.com så vi kan snacka på msn!


   
SvaraCitera