Denis1's Profile User Rating: *****

Reputation: 28 Craftsman
Group:
Author w/DIC++
Active Posts:
98 (0.07 per day)
Joined:
29-July 09
Profile Views:
15,820
Last Active:
User is offline Yesterday, 07:28 AM
Currently:
Offline

Previous Fields

Country:
GB
OS Preference:
Linux
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
XBox
Your Car:
Honda
Dream Kudos:
800

Latest Visitors

Icon   Denis1 Mafia Text Based Games tutorials Coming up

Posts I've Made

  1. In Topic: Text Based Mafia Game || Register and Forgot pass Part 2.

    Posted 25 Apr 2013

    View PostCydex, on 23 April 2013 - 09:40 PM, said:

    i got stuck Lost_Pass.php
    i did everything and i try to use it and wrote ,my mail and i got this massage We sent you an email with your Details! , but i never get the Details !
    This My Code Please any help
    <?php include_once("connect.php"); ?>
    <html>
    <body>
    <? require 'functions.php'; ?>
    <? 
    if (isset($_POST['Register'])) {
    
    $password = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
    		// Generate a random password
    }
    		
    
    ?>
    
    <? 
    if (isset($_POST['Send'])) {
    
    $password = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
    		// Generate a random password
    $nsql = "SELECT * FROM users WHERE mail='".mysql_real_escape_string($_POST['Email'])."'";
    $query = mysql_query($nsql) or die(mysql_error());
    $row = mysql_fetch_object($query);
    $name = htmlspecialchars($row->name);
    $pass = htmlspecialchars($row->password);
    $mail = htmlspecialchars($row->mail);
    
    	
    	
    if((empty($_POST['Email']))){ // if the email field is empty there will be an error
    
    		echo 'You one field empty.';
    	}else{
    		
    	
    	  if(empty($name)){ // there is no name with the entered email
    		echo 'Invalid information.';
    	}else{
    	
    	  if($_POST['Email'] != $mail){
    			echo 'Invalid information.'; // if their is no match in the email
    	}else{
    	
    	if(!checkEmail($_POST['Email'])){ // the checkEmail function we have in our function that saves us time and sapce
    		echo 'Your email is not valid!';
    	}else{
    		
    	$result = mysql_query("UPDATE users SET password='$password' WHERE name='" .mysql_real_escape_string($name). "'") 
    or die(mysql_error());	
    
    			$to = $_POST['Email'];
        $from = "owner@df.w-sro.com";
        $subject = "Registration - Your Registration Details";
    
        $message = "<html>
       <body background=\"#4B4B4B\">
       <h1>Game Registration Details</h1>
       Dear $name, <br>
        <center>
    Your Username: $name <p>
    
    Your Password: $password <p>
    
      </body>
    </html>";
       
        $headers  = "From: Game Lost Details <owner@df.w-sro.com>\r\n";
        $headers .= "Content-type: text/html\r\n";
    
    	mail($to, $subject, $message, $headers);             
    
    			echo 'We sent you an email with your Details!';
    		
    	}
    }
    }// check if name is unused.
    }// check if accepted to the tos.
    }// name check.
    // if post register.		
    
    ?>
    
    <form method="post" >
      <center>
        <h1><strong>Lost Password</strong></h1>
        <p>Email: 
          <input type="text" name="Email" id="Email">
          <br>
    <input type="submit" name="Send" id="Send" value="Send">
        </p>
    </center>
    </form>
    
    </body>
    </html/>
    


    Try using my send_mail function, also are the details getting saved on to the database? try making the login.
  2. In Topic: Text Based Mafia Game || Database with Connection Part 1.

    Posted 20 Apr 2013

    View Postfature, on 31 March 2013 - 12:31 AM, said:

    <?php include_once("connect.php"); ?>
    <? require 'functions.php'; ?>
    <? 
    if (isset($_POST['Register'])) {
    
    
    if(strlen($_POST['Username'])<3 || strlen($_POST['Username'])>32)
    	{ // This check the characters of the username and it makes sure if it is longer that 3 letters.
    		echo 'Your name must be between 3 and 32 characters!';
    	
    	}else{
    	
    	if(empty($_POST['Password'])){ // This checks the password field to see if it is empty
    		echo 'You need to select a password!';
    	}else{
    	
    	if(preg_match('/[^a-z0-9\-\_\.]+/i',$_POST['Username']))
    	{// this checks the user for any symbols space etc .You can remove this is you choose
    		echo 'Your name contains invalid characters!';
    	}else{
    	
    	if(!checkEmail($_POST['Email']))
    	{ // this is one of the functions we added on the function page. for this to work make sure the function is required on this page
    		echo 'Your email is not valid!';
    	}else{
    	
    
    if(empty($_POST['Agree'])){ // Check if the Checkbox is checked to agree with the terms of services
    echo "You need to accept the Terms & conditions  in order to sign up.!";
    }else{
    
    
    // this check and makes sure that their are no duplication with the email
    $sql = "SELECT id FROM users WHERE mail='".mysql_real_escape_string($_POST['Email'])."'";
    $query = mysql_query($sql) or die(mysql_error());
    $m_count = mysql_num_rows($query);
    	  
    if($m_count >= "1"){
    echo 'This email has already been used.!';
    }else{
    
    
    // this makes sure that all the uses that sign up have their own names
    $sql = "SELECT id FROM users WHERE name='".mysql_real_escape_string($_POST['Username'])."'";
    $query = mysql_query($sql) or die(mysql_error());
    $m_count = mysql_num_rows($query);
    	  
    if($m_count >= "1"){
    echo 'This name has already been used.!';
    }else{
    
    $password = md5($_POST['Password']); // this is a md5 hash. its encrypt your password so it isnt easily hackable
    
    
    
    // The id is blank because it is an auto_increment  which mean it will auto add a value to every user and the are all different. this is mainly so we dont have dupilcate. 
    													
    $sql = "INSERT INTO users SET id = '', name = '".$_POST['Username']."' , password= '$password', mail= '".$_POST["Email"]."'";
    $res = mysql_query($sql);
    
    $to = $_POST['Email'];
        $from = "no-reply@Game.co.uk";
        $subject = "Registration - Your Registration Details";
    
        $message = "<html>
       <body background=\"#4B4B4B\">
       <h1>Game Registration Details</h1>
       Dear ".$_POST['Username'].", <br>
        <center>
    Your Username: ".$_POST['Username']."<p>
    
    Your Password: ".$_POST['Password']."<p>
    
    	  <p>
    	  <font size=3> You recived this mail because someone used this mail to sign up to a game</font>
      </body>
    </html>";
       
        $headers  = "From: Game Registration Details <no-reply@Game.co.uk>\r\n";
        $headers .= "Content-type: text/html\r\n";
    
    	mail($to, $subject, $message, $headers);             
    
    echo "".$_POST['Username'].", Welcome to the game.";
    }}}
    						}
    
    					}
    			}
    	}
    }
    
    ?>
    <form method="post" >
      <center>
        <h1><strong>Registeer hier:</strong></h1>
        <p>Gebruikersnaam: 
          <input type="text" name="Username" id="Username">
        </p>
        <p>Wachtwoord:
          <input type="password" name="Password" id="Password">
        </p>
        <p>Emailadres: 
          <input type="text" name="Email" id="Email">
        </p>
        <p> Toon aan dat je geen BOT bent:
          <input type="checkbox" name="Agree" id="Agree">
          <br>
    <input type="submit" name="Register" id="Register" value="Registeer">
        </p>
      </center>
    </form>
    <? 
    if (isset($_POST['Register'])) {
    
    $password = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
    		// Generate a random password
    }
    		
    
    ?>
    
    <? 
    if (isset($_POST['Send'])) {
    
    $password = substr(md5($_SERVER['REMOTE_ADDR'].microtime().rand(1,100000)),0,6);
    		// Generate a random password
    
    $nsql = "SELECT * FROM users WHERE mail='".mysql_real_escape_string($_POST['Email'])."'";
     $query = mysql_query($nsql) or die(mysql_error());
     $row = mysql_fetch_object($query);
     $name = htmlspecialchars($row->name);
     $pass = htmlspecialchars($row->password);
     $mail = htmlspecialchars($row->mail);
    
    	
    	
    if((empty($_POST['Email']))){ // if the email field is empty there will be an error
    
    		echo 'You one field empty.';
    	}else{
    		
    	
    	  if(empty($name)){ // if there is no name with the entered email
    		echo 'Invalid information.';
    	}else{
    	
    	  if($_POST['Email'] != $mail){
    			echo 'Invalid information.'; // if their is no match in the email
    	}else{
    	
    	if(!checkEmail($_POST['Email'])){ // the checkEmail function we have in our function that saves us time and sapce
    		echo 'Your email is not valid!';
    	}else{
    		
    	$result = mysql_query("UPDATE users SET password='$password' WHERE name='" .mysql_real_escape_string($name). "'") 
    or die(mysql_error());	
    
    			$to = $_POST['Email'];
        $from = "no-reply@Game.co.uk";
        $subject = "Registration - Your Registration Details";
    
        $message = "<html>
       <body background=\"#4B4B4B\">
       <h1>Game Registration Details</h1>
       Dear $name, <br>
        <center>
    Your Username: $name <p>
    
    Your Password: $password <p>
    
      </body>
    </html>";
       
        $headers  = "From: Game Lost Details <no-reply@Game.co.uk>\r\n";
        $headers .= "Content-type: text/html\r\n";
    
    	mail($to, $subject, $message, $headers);             
    
    			echo 'We sent you an email with your Details!';
    		
    	}
    }
    }// check if name is unused.
    }// check if accepted to the tos.
    }// name check.
    // if post register.		
    
    ?>
    
    
    


    Keep getting: Parse error: syntax error, unexpected T_ECHO, expecting '(' in /home/a2156125/public_html/Register.php on line 145

    please help!


    At line 144 you have an if that i presume should be commented.

    if(empty($name)){ [b]if[/b] // there is no name with the entered email
            echo 'Invalid information.';
    
  3. In Topic: Does Anyone Know of Any Video Website Tutorials?

    Posted 16 Apr 2012

    First you need to get yourself a Dedicated server or VPS.
    Then you need to install a series of encoders, click here to find a tutorial on how to do so.
    You will then need to create an uploader script which will encode/convert the videos to FLV. Click hereto find out more.
    After that you will need a website design which will include a flash player ===> This is the one I use
  4. In Topic: CodeIgniter Text Based Mafia Game || Intro / Set-up Part 1

    Posted 14 Apr 2012

    View PostSergio Tapia, on 13 April 2012 - 07:54 PM, said:

    How do you feel Kohana compares to CodeIgniter? I've heard some comparisons before but nothing quite in depth. More importantly, which has the better View Engine?

    When I was deciding my framework of choice, Kohana was in my top 5 list (along with CakePHP, YII, Zend and Codeigniter). I didnt really side by side compare Kohana to codeigniter but I can tell you the advantages and disadvantages between the two and my likes and dislikes.

    Support
    Starting off with support. When it comes to support in feel that Codeigniter is more supported and documented that Kohana. click here to view the Kohana user guide and documentationand click here to view the codeigniter user guide and see for yourself. This isn't a big deal for me but when I starting learning a new system I'd like to be well inform of the workings of the system that way I can fully understand my way around the system.

    Core
    When we look at the core design of both framework we can see that codeigniter has the standard MVC design pattern used by most developers and however Kohana uses Hierarchical-Model-View-Controller (HMVC). HMVC is not a bad thing, in fact most developers see it as a way expanding systems can use less resources( as I come to understand it). There is a blog post by one of the developers that work on Kohana explaining the differences between MVC and HMVC. By the looks and explanation of HMVC the main use of it is in complexing and growing system, When I was trying to archive is just a simple system and as far as I can see MVC's done the job well, I know and understand it more( and as the say "stick to your strengths"). There are still things I don't understand about HMVC and i am still learning about the usefulness and because of this issue Codeigniter made sense to me.

    Design / layout
    Just like support this is mainly based on preference. I find the layout and overall design of codeigniter very simple and because of this it seem like a great place to start learning about frameworks and navigations through files was also simple most of the layout of files is based on the fact that it is MVC instead of HMVC

    View Engine
    Since I didn't develop a full system in Kohana. I cant tell you much about the view engine in that framework. What I can tell you is that from following a few tutorials I saw how easy it is in to implement a template system. As you can see in the tutorial templating with codeigniter is very simple just the linking of series of files. In future tutorials you will see how easy the rest is to implement.

    There is a lot more to the two frameworks than what I have talked about, it is all very fascinating how pages linked can make the structure and foundation for any system to be built upon. I highly recommend that if you are deciding to use a framework that you narrow you choices from look the demonstration and then download them test them out until you find one that best suits you the most. If I am doing a massive project for commercial use Zend will be my framework of choice, which just means that for different tasks there are different frameworks which you can use.

    I hope that gave you an overview of the two frameworks from my point of view.
  5. In Topic: Text Based Mafia Game || Usersonline/ Inside game Design part 4

    Posted 12 Apr 2012

    View PostTgrooms, on 12 April 2012 - 10:52 AM, said:

    anyone else getting double the tables when you click users online link?


    would you like to share your code with us to see where you are going wrong?

My Information

Member Title:
D.I.C Head
Age:
20 years old
Birthday:
October 14, 1992
Gender:
Interests:
Programming
Full Name:
Denis
Years Programming:
7
Programming Languages:
PHP, HTML,VB.NET,MySQL,C++ and CSS

Contact Information

E-mail:
Click here to e-mail me
MSN:
MSN  hingasellu@hotmail.com
Website URL:
Website URL  http://addplanet.co.uk/

Friends

Showing 50 random friends of 7

Comments

  • (2 Pages)
  • +
  • 1
  • 2
  1. Photo

    fature Icon

    30 Mar 2013 - 16:29
    it's at this one: http://www.dreamincode.net/forums/topic/184585-text-based-mafia-game-register-and-forgot-pass-part-2/
  2. Photo

    fature Icon

    30 Mar 2013 - 16:29
    it's at this one: http://www.dreamincode.net/forums/topic/184585-text-based-mafia-game-register-and-forgot-pass-part-2/
  3. Photo

    fature Icon

    30 Mar 2013 - 16:29
    Dear denis, i still getting:
    Parse error: syntax error, unexpected T_ECHO, expecting '(' in /home/a2156125/public_html/Register.php on line 145
    i would like to continue you'r tutorial but i can't find the prob please help
  4. Photo

    kall447 Icon

    23 Feb 2013 - 06:41
    Hello Denis
    I sent you an email to hingasellu@hotmail.com
    Can you please answer i need some help :)
    opel-campo@hotmail.com
  5. Photo

    Steffen Icon

    19 Jan 2013 - 08:11
    Hi Denis!
    I have sendt you an E-mail to this E-mail adress hingasellu@hotmail.com.
    Is it possiple for you to answear that E-mail? It is abit important for me to know the answears. :)
    I hope you can help me out.
    -Steffen
    PS:
    The E-mail adress i sent the E-mail from is SteffenLie@1337.no
  6. Photo

    zer03d Icon

    24 Dec 2012 - 23:32
    EMAIL HASSANENO55@GMAIL.COM
    THE GAMES ARE CITYWAR.NET
    AND THE OTHER IS CRIMELEGEND.COM WHICH ARE BOTH OWNED BY THE SAME GUY. THESE ARE THE KIND OF GAMES I WANT TO LEARN HOW TO CREATE. IF I SUCCESS ED THEN I WILL LEARN FROM THERE AND TEACH MY SKILL TO OTHERS. I REALLY NEED THIS, AM DESPERATE. THANK YOU VERY MUCH
  7. Photo

    zer03d Icon

    24 Dec 2012 - 23:29
    am new here and i read your tut but i honestly dont have and programming and coding skills, but i believe i can do it with a little of help and all i ask is for your help. please am begging, ive had this idea for about a year and have started reading html css php and all those but still no success-ed.. PLEASE HELP ME
  8. Photo

    zer03d Icon

    24 Dec 2012 - 23:25
    Hey can you email me. i was wondering if you could help me out on making a browser based mmorpg game like these (crimelegend.com) and (citywar.net) but better. Im only 16 and i have been lookung around for 3 months and failed alot. If you could help me out that would be so awesome. email hassaneno55@gmail.com
  9. Photo

    mrhat187 Icon

    27 Sep 2012 - 21:12
    Hey man just wondering if you are going to do more code igniter tutorials, or if you maybe have the home files so I could study them.
  10. Photo

    uniity Icon

    15 Aug 2012 - 18:28
    Hello, you can not sent in all the files from the 1-10 guide because nothing can understand and really does not work .. You can link which is sent in or e-mail you --- janis0180@gmail.com
    Previously fairy thank you ..
  11. Photo

    uniity Icon

    15 Aug 2012 - 18:28
    Sveiki, tu nevari atsutit visus failus no 1 - 10 pamaciba jo neko nevar saprast un isti nekas nesanak.. Vari atsutit linku kur ir vai pa e-pastu atsuti --- janis0180@gmail.com
    Ieprieks jau pasaku paldies..
  12. Photo

    demon3092 Icon

    26 Jul 2012 - 10:57
    Hi there mate i was wandering if you can send me the codes for the mafia game you have so far so i can see where i am going wrong!!
    Cant seem to get by the 3/4 tutorial that you have made.
    Could you email me please
    drealms1986@gmail.com
  13. Photo

    cranks Icon

    04 Mar 2012 - 08:16
    Can you please upload all the files and the sql for download ?
  14. Photo

    cranks Icon

    04 Mar 2012 - 08:13
    Hey i love your tutorials :DD:D
  15. Photo

    Luke1234 Icon

    13 Jan 2012 - 05:37
    Hi there, first of all i just want to say a massive thanks for the mafia tutorial! is just what i was looking for.
    however i do have a little problem at the moment and i dont have a clue what its going on!
    have emailed you, as i cant find the pm option on here!
    Thanks.
  • (2 Pages)
  • +
  • 1
  • 2