Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


PHP + Mysql

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Maes
Advanced Cheater
Reputation: 10

Joined: 09 Apr 2009
Posts: 50

PostPosted: Mon Jun 28, 2010 8:17 pm    Post subject: PHP + Mysql Reply with quote

I just got cold-hosting.org/
and I was looking for a script that would let users signup for a domain that would require a password to work.

I know its not ethical to ask others to make one, but I just used my birthday money for this, and want to hold small hosting for users I know.
Back to top
View user's profile Send private message
Freiza
Grandmaster Cheater
Reputation: 22

Joined: 28 Jun 2010
Posts: 662

PostPosted: Mon Jul 19, 2010 2:39 pm    Post subject: Reply with quote

specify your requirements in detail.
php-mysql is mandatory? or any other scripting language will work.
Back to top
View user's profile Send private message Send e-mail
BOU
Expert Cheater
Reputation: 0

Joined: 15 Apr 2009
Posts: 239
Location: Youtube watching Japanese Rock, and Korean Pop - Music Videos =)

PostPosted: Mon Jul 19, 2010 3:44 pm    Post subject: Reply with quote

Signup form (.html or anything you want)
Code:

<form method="POST" action="register.php">
<input type="text" name="form_username">Username<br />
<input type="password" name="form_pw1">Password<br />
<input type="password" name="form_pw2">Re-type password<br />
</form>


register.php
Code:

<?php
 #CONNECT TO DATABASE#
 #ysql_connect('DATABASE','USERNAME','PASSWORD');
 mysql_connect('localhost','root','');
 mysql_select_db('user_data'); //PUT IN THE DATABASE
 $form_username=$_POST['form_username'];
 $form_pw1=$_POST['form_pw1'];
 $form_pw2=$_POST['form_pw2'];
 if($form_username==''||$form_pw1==''||$form_pw2=''){
  if($form_pw1==$form_pw2){
   mysql_query("INSERT INTO (tablename) VALUES('','$form_username','$form_pw1')");
  }else{
   echo'Both passwords must be the same!';
  }
 }else{
  echo'Please fill in all forms';
 }
?>


with this, the MYSQL table should look like
ID | USERNAME | PASSWORD
1 | testuser1 | password

_________________
Rawr
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Jul 19, 2010 5:38 pm    Post subject: Reply with quote

JPU666's method above is extremely vulnerable to injection, I would not suggest using it in a live environment.

There are tons of scripts on the net, and tutorials, explaining how to make a login system for a website. You should probably do your homework and learn how to do things before attempting to run a site.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites