mybluehair Posted November 11, 2007 Share Posted November 11, 2007 i am making a chat room using only php and mysql. and i want it to be so you have to make a account (simple username and password account) to be able to access the chat room. except i dont know how. i need to make a registration page, and a login page. i can make the registration page were whatever they entered for the username and password will be put into my mysql DB, but thats really all i know how to do. can someone teach me? here is my chat room code: <? $database = "*************"; $username = "**********"; $password = "***********"; $message=$_POST['message']; echo ' <center><a href="logintoap.html">Admin panel</a></center><br> <form action="allinone.php" method="post"> <br> chat message:<br> <textarea rows="12" cols="65" name="message" id="message"></textarea> <br><br> <input type="submit"><br>'; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die ( "unable to connect"); if ($message == '') { $message = false; } else { $query = "INSERT INTO contacts VALUES ('', '$message', NOW())"; } mysql_query($query); mysql_close(); echo '<hr>'; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die ( "unable to connect"); $query="SELECT * FROM `contacts` ORDER by 'datetime' DESC "; $result=mysql_query($query); $num=mysql_numrows($result); mysql_close(); echo "<b><center>chats:</center></b><br><br><br>"; $i=0; while ($i < $num) { $message=mysql_result($result,$i,"message"); echo "<b>$message</b><br><hr><br>"; $i++; } ?> Link to comment https://forums.phpfreaks.com/topic/76879-solved-i-need-to-make-a-member-feature/ Share on other sites More sharing options...
GingerRobot Posted November 11, 2007 Share Posted November 11, 2007 There are literally hundreds of membership system tutorials out there - i suggest you google. There used to be one on this site, though i can't seem to find it at the moment. Link to comment https://forums.phpfreaks.com/topic/76879-solved-i-need-to-make-a-member-feature/#findComment-389263 Share on other sites More sharing options...
mybluehair Posted November 11, 2007 Author Share Posted November 11, 2007 There are literally hundreds of membership system tutorials out there - i suggest you google. There used to be one on this site, though i can't seem to find it at the moment. ok, what should i search for exactly on google? Link to comment https://forums.phpfreaks.com/topic/76879-solved-i-need-to-make-a-member-feature/#findComment-389275 Share on other sites More sharing options...
FireDrake Posted November 11, 2007 Share Posted November 11, 2007 try [move]member feature php script[/move] Link to comment https://forums.phpfreaks.com/topic/76879-solved-i-need-to-make-a-member-feature/#findComment-389307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.