Phantom Coder's Profile User Rating: -----

Reputation: 2 Apprentice
Group:
New Members
Active Posts:
13 (0.01 per day)
Joined:
26-April 09
Profile Views:
714
Last Active:
User is offline Feb 11 2012 05:31 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Internet Explorer
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Toyota
Dream Kudos:
0

Latest Visitors

Icon   Phantom Coder has not set their status

Posts I've Made

  1. In Topic: Text Based Mafia Game || Staff and Forum Part 5

    Posted 6 Feb 2012

    @modi123_1 I'm sorry I did notice the dates but I still looked to see if someone answered their questions I have forums post that I have on other boards I still check to see if I got an answer. I thought someone would benefit from it since I had the exact same error they did until I figured it out.
  2. In Topic: Text Based Mafia Game || Staff and Forum Part 5

    Posted 6 Feb 2012

    Thanks for the this part in your tutorial. I came across a couple of bugs I been trying to figure out and remove but so far no luck. I just have the stock code you have in the post I did not see any reason to make this post any longer with the exact same code.

    1st when you lock a post the admin tool links disappear. don't we need some way to unlock a post?
    2nd when you navigate to the post in your browser window e.g. http://mafiagame.ric...m_edit.php?id=1
    you can still edit the post even if it was locked. would we need some way to check to see if we arrived to the post using the edit post button?

    Thanks again for the great tutorials
  3. In Topic: Text Based Mafia Game || Staff and Forum Part 5

    Posted 6 Feb 2012

    View PostHappyJackie, on 09 December 2010 - 09:47 PM, said:

    I am having the same issue as the individual above is there anyone that can help with this?


    did you require("safe.php); ?
    i was having the same problem until i realized it was using variables from safe.php
  4. In Topic: Text Based Mafia Game || Usersonline/ Inside game Design part 4

    Posted 6 Feb 2012

    Hello everything seems to be working fine no errors but for some reason it wont update the lastactive field in the database.
  5. In Topic: Text Based Mafia Game || Login, Layout/design Part 3

    Posted 5 Feb 2012

    Thanks a lot for the third installment of your tutorial!!!!! awesome.

    it seems i been getting a lot of functions lately. i thought i share them with you.

    <?php
    /**
     * @author Phantom Coder
     * @copyright 2010-2012
     */
     
    function connect() {
    	 // localhost is common on most hosts.
    	 $mysql_server = "localhost";
    	 //  this is the name of your username of the server.
    	$mysql_user = "dbuser";
    	 // the password connected to the username. MAKE IT COMPLEX.
    	$mysql_password = "P@ssw0rd";
    	 // the database name of where to connect to and where the information will be help.
    	$mysql_database = "dbname";
    	$connection = mysql_connect("$mysql_server","$mysql_user","$mysql_password") or die ("Unable to establish a DB connection");
    	$db = mysql_select_db("$mysql_database") or die ("Unable to establish a DB connection");
     }
    
     // This function is going to help us filter out bad email from the good one and it makes sure the email enter is in the format of as@as.com
     function checkEmail($str) {
    	return preg_match("/^[\.A-z0-9_\-\+]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $str);
    }
    
    // this is a send email function that will help us send email to the registered users.
    function send_mail($from,$to,$subject,$body) {
    	$headers = '';
    	$headers .= "From: $from\n";
    	$headers .= "Reply-to: $from\n";
    	$headers .= "Return-Path: $from\n";
    	$headers .= "Message-ID: <" . md5(uniqid(time())) . "@" . $_SERVER['SERVER_NAME'] . ">\n";
    	$headers .= "MIME-Version: 1.0\n";
    	$headers .= "Date: " . date('r', time()) . "\n";
    
    	mail($to,$subject,$body,$headers);
    }
    
     // sanitizes the input from the users in our forms
    function protect($string) {
        return mysql_real_escape_string(strip_tags(addslashes($string)));
    }
    
    //error output for status messages
    function outputerror($string) {
    	echo "<div id=\"outputerror\">" . $string . "</div>";
    }
    
    //normal output for status messages
    function outputnormal($string) {
        echo "<div id=\"outputnormal\">" . $string . "</div>";
    }
    
    // keeps the copright date current
    function copyrightdate() {
         $time = time ();
         $year= date("Y",$time);
         echo $year;
    }
    
    // Logs out the users.
    function logout() {
    	// if already logged in.
    	if(isset($_SESSION['user_id'])) {
    		unset($_SESSION['user_id']);
    		session_destroy(); 
    		outputnormal("You have been logged out.");
    	}
    }
    
    ?>
    
    


    I hope you find them useful as I am. I'm going on to part 4 NOW!!!!!

My Information

Member Title:
New D.I.C Head
Age:
48 years old
Birthday:
May 16, 1965
Gender:
Location:
Salt Lake City, UT

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://

Friends

Phantom Coder hasn't added any friends yet.

Comments

Phantom Coder has no profile comments yet. Why not say hello?