logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-13-2011, 10:58 AM   #1
RealEfect
 
Join Date: Jul 2011
Posts: 1
Default Registration system problem

Hi everyone, i want to create registration system by myself and i don't want to look to already created systems in the internet.I started now learning php, because i want to make my website better, but there is many problems with this system about which i was talking now.So my code is this in index.php file:
Code:
<html>
<head>
<title>Php page</title>
</head>
<body>
<?php
?>
<form action="register.php" method="post"> 
<input type="text" name="nickname" /></ br>
<input type="password" name="pass" method="post" /></br>
<input type="submit" value="Register" /></form>
</body>
</html>
And now this registration.php file, which should do all regitration stuff:
Code:
<html>
<head>
<title>Php register system</title>
</head>
<body>
<?php
$nickname= $_POST['nickname'];
$password=$_POST['password'];
$data5=$nickname;
$data6=$password;
$registration=$data6 . ".txt";
$data1=fopen($registration, 'r');
$data2=fread($data1,filesize($registration));
fclose($data1);
$data3=fopen($registration, 'w');
$data4=fwrite($data3,$data5);
$data7=fwrite($data3,$data6);
fclose($data3);
if($data5 == $data2 && $data6 == $data2)
{
echo "You already logged in!";
}
elseif($data5 != $data2 && $data6 != $data2)
{
echo $data4 . $data7;
echo "Your user was successfuly created!";
}
?>
</body>
</html>
Yes, i know it's very simple, but i really want to do it myself, but now actually i can't solve without help.I get many errors when register with my system and click register button.Maybe you know what is wrong here?

Last edited by RealEfect; 07-13-2011 at 11:07 AM..
RealEfect is offline   Reply With Quote
Old 07-14-2011, 01:55 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

what are the errors ?

i assume $data5=$nickname;
$data6=$password; are queries to your data base. are they correct?
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com