Help - Search - Members - Calendar
Full Version: Member Registration And Login System
Zymic Webmaster Forums > Zymic Free Web Hosting > Tutorials
Pages: 1, 2
IamShipon1988
QUOTE
I made all those files and then i uploaded them to my website, won't work.

Jacce what problems are you encountering. Make sure you upload the files and change the permissions of those files as requested.
QUOTE
Is it possible to have this login working and that even though the site is coded in HTML?

In order for any php functions to work, the file must have a .php extension. However, if you want the login form in your HTML page, you can try using iFrames. It is a bad practice to do that. It is best just to convert your pages to PHP as you can incorporate your HTML code in php as well.
Jacce
QUOTE(IamShipon1988 @ Nov 3 2010, 04:06 PM) *
Jacce what problems are you encountering. Make sure you upload the files and change the permissions of those files as requested.

In order for any php functions to work, the file must have a .php extension. However, if you want the login form in your HTML page, you can try using iFrames. It is a bad practice to do that. It is best just to convert your pages to PHP as you can incorporate your HTML code in php as well.

What do you mean change permissions? Well, anyway, here you can see my problem: http://mc-rp.zxq.net/index.php

And how do I use HTML code in a PHP file?

EDIT: Excuse me for these noob questions. I coded my first webpage just a half year ago and this is the very first time I work with PHP and MySQL.
uncled1023
your error is because you didnt change the username and password and such in the config file... it thinks ****** is your username for the mysql database. also, you use html in a php page just normally. all you do is change .html to a .php, and then you can use php in your html file.
Jacce
QUOTE(Jacce @ Nov 3 2010, 05:30 PM) *
What do you mean change permissions? Well, anyway, here you can see my problem: http://mc-rp.zxq.net/index.php

And how do I use HTML code in a PHP file?

EDIT: Excuse me for these noob questions. I coded my first webpage just a half year ago and this is the very first time I work with PHP and MySQL.

Well, I don't really know what to write there. Is it the name of my Zymic database or what?

EDIT: I think I've finally fixed it ...
But, the links wont work when I click on them. I have to manually write in the adress to go to another side.
EDIT2: If you like to see how it looks like, go to http://mc-rp.zxq.net/ and at the right you will see links to register and login, none of them will work.
EDIT3: That's fixable, but registration wont work. When I press "Submit", it just sends you back to index.php. Or accely, it send you to index.php?id=register
uncled1023
well, the links seem to work. teh registration, its supposed to send you to id=register. and all your links, are supposed to use index.php?id=(page you want minus .php)

and in index, you had to put the include thing to include the id of the page.
Jacce
Umm, I don't really understand, but I'll give it a shot.

EDIT: Fixed it, thanks
EDIT2: GOSH!!! The errors still keep coming. When I log in it sends me to profile.php, but the sub category wont show up and to the right it say "fatal error" and suchs. But when i write http://mc-rp.zxq.net/profile.php it works fine.
EDIT3: Also, this code won't work:
CODE
<?php include 'login_check.php'; ?>

I tried both in the very top of the page, inside the <head>-tags and under the <body>-tag.
It just ends up showing <script type="text/javascript"> over the menu.
EDIT4: The login bug is fixed, I figured out that I can't use /index.php?id=*page* links to my original pages, it just won't work.
EDIT5: Fixed the other thing, though it redirects me to index EVEN when I'm logged in.
EDIT6: Edit5 is no longer necessary. Though I would like to know how to make so a user can change his password, e-mail and maybe even upload an avatar?
IamShipon1988
You mean something like a profile editor? You can do that by creating a document that will basically replace the current database entry with new ones.
Jacce
Yea, but how to do that?
EDIT: Someone crashed my forum by writing something with JavaScript in a new topic. I fixed this by removing the topic. But I saw a big security breach. Is there any way to prevent users using programming language in my forum?
EDIT2: I'm trying to use reCAPTCHA in my login to increase security. But what's the name of the verify file?
EDIT3: I can't get reCAPTCHA to work... And how to make an e-mail verification thing?
EDIT4: How to send the users IP to the database when he registrates? I know how to get the visitors IP, but not how to add it to the database when he registrates.
Jacce
It's been two weeks now, still no help -.-
EDIT: I think I've fixed the thing mentioned in EDIT4 in the last reply.
Faithkarm4
Alright, I am having massive problems with this set up. I can't get anything to access the database and register.php is showing up on my site but not actually doing anything. I click it, it pulls up the table then you type the information in and it sends you back to the main page but nothing goes to the database. Any suggestions? I really need help. I tried going to the support chat here and they really aren't helpful, they keep telling me I should know this and that. I finally just decided to come here and post. Someone please help me out, it would be greatly appreciated.
aleabby
Great job, sometime even I do stuck in these code, its simple but get confused when some complexity is involve.
EoinC
Thanks very much for this tutorial

when i implement this code it wont submit any details to the database and i cant figure out why. When i fill in the registration form
i get the following message


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/zzl.org/e/o/i/******/htdocs/register.php on line 37
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/zzl.org/e/o/i/*******/htdocs/register.php on line 39

(These seem to be the lines checking if the name is already in the database - and when i go to log in it tells me the user name dosent exist)

following this no information seems to be going into the database

i havent changed any information in your scripts except the info to connect to the database which i believe is correct.

Id really appreciate any help you can offer

PS. I havnt posted in a forum before so i hope ive done this correctly unsure.gif
miyly
This tutorial is great! Its working for me, I could register and the data shows up in my database after that,
up until I try to login with the registered account and it says that my password is incorrect.
Quite odd and funny.
Has anyone experience this? unsure.gif
Nuki
Hey, I want to ask, if I follow this tutorial can I use phpbb forum registation afther that?
Right now it gives me Could not open socket. Is that mean i have to pay and open server socket or i can go around somehow?
This is web link http://culo.clanteam.com/foorum and its uses my mother language. smile.gif
VoidPC
I don't understand PHP or MySQL at all. Where can i find my sql injection box? :-/
Jacce
I'm trying to use this with safe mode off. Any help how to do that? Error message:

Fatal error: Call to undefined function safe() in /home/****/public_html/register.php on line 11
ssfdre38
you cant safemode() is enable and there is no work around for it
Jacce
QUOTE(ssfdre38 @ Feb 19 2011, 05:09 AM) *
you cant safemode() is enable and there is no work around for it

I'm trying to do it on another host (000'webhost (omg, why do they censor that?)) using this tutorial. But, they have safemode() off.
ghawk
NEWBIE: I would like to use this system with modifications. I would like to capture more registration information than included.

Questions:

On config.php page should all the database variables be listed?

Even though 'include config.php' is at the top of other pages, the variable information is also repeated. Does this mean that where it is repeated, it should match my database variables?

Can I connect from the registration page to another page using <a href = ?> THEN from the that page have the user log out?


May not be asking the correct questions to get where I'm going. Bear with me.


PeterMartin
Really thankful for the tutorial. It is one of the good forum that i found.
keeser
Thanks you very much for this wonderful tutorial smile.gif
I learn a lot smile.gif

keep on making tutorials smile.gif
Epix
Great tutorial *claps*
But I have an issue...
So I started it the index.php files on localost/index.php (i'm using xampp) and when I went to register and entered the test info it said this....

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\register.php on line 37

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\register.php on line 39

Do you know what happened? mellow.gif
kayybee
In register.php, I have a problem with the code...

$_POST['uname'] = safe($_POST['uname']);
$_POST['passwd'] = safe($_POST['passwd']);
$_POST['email'] = safe($_POST['email']);
$_POST['website'] = safe($_POST['website']);
$_POST['location'] = safe($_POST['location']);
Those five lines seem to be the problem.
the error message on the site is:
Fatal error: Call to undefined function safe() in /www/zxq.net/p/o/k/pokemonscratch/htdocs/register.php on line 11
Larabeast
You say the code works in this tutorial yet I'm having the same problem others are, I've done everything exactly as it should be and it's just taking me back to my index.php..... It's really annoying.... Also you're confusing as hell man, you tell us what to add into index step by step and then where you say it should look like this: there's code in that finished copy that you didn't even mention in the steps. What's up with that? I can let you access my desktop and show you EVERYTHING is exactly as it should be going by your tut, only that one function doesn't work and I can't seem to fix it. I really hope you can help me address the problem.
assassin120
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'assassin120_zzl_'@'192.168.1.1' (using password: YES) in /www/zzl.org/a/s/s/assassin120/htdocs/config.php on line 10
Couldn't connect to server.

why happend that????
ssfdre38
that is not the right user that is part of your database name your user would look something like 123456_user and your database name would look something like example_zxq_dbname

http://zymickb.tk/index.php/MySQL
shnooky
Thanks for the help! Very thorough tutorial.
ermansayin
Yay! It worked! Thanks for your help!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.