Denis1's Profile
Reputation: 28
Craftsman
- Group:
- Author w/DIC++
- Active Posts:
- 98 (0.07 per day)
- Joined:
- 29-July 09
- Profile Views:
- 15,820
- Last Active:
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
-
RawrItsAdam 
Yesterday, 12:41 PM -
finalpear 
02 May 2013 - 13:08 -
darek9576 
25 Apr 2013 - 04:34 -
Cydex 
23 Apr 2013 - 13:22 -
New-Reign 
22 Apr 2013 - 05:51
Posts I've Made
-
In Topic: Text Based Mafia Game || Register and Forgot pass Part 2.
Posted 25 Apr 2013
Cydex, 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. -
In Topic: Text Based Mafia Game || Database with Connection Part 1.
Posted 20 Apr 2013
fature, 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.'; -
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 -
In Topic: CodeIgniter Text Based Mafia Game || Intro / Set-up Part 1
Posted 14 Apr 2012
Sergio 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. -
In Topic: Text Based Mafia Game || Usersonline/ Inside game Design part 4
Posted 12 Apr 2012
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:
-
hingasellu@hotmail.com
- Website URL:
-
http://addplanet.co.uk/
|
|


Find Topics
Find Posts
View Reputation Given


|
Comments
fature
30 Mar 2013 - 16:29fature
30 Mar 2013 - 16:29fature
30 Mar 2013 - 16:29Parse 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
kall447
23 Feb 2013 - 06:41I sent you an email to hingasellu@hotmail.com
Can you please answer i need some help :)
opel-campo@hotmail.com
Steffen
19 Jan 2013 - 08:11I 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
zer03d
24 Dec 2012 - 23:32THE 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
zer03d
24 Dec 2012 - 23:29zer03d
24 Dec 2012 - 23:25mrhat187
27 Sep 2012 - 21:12uniity
15 Aug 2012 - 18:28Previously fairy thank you ..
uniity
15 Aug 2012 - 18:28Ieprieks jau pasaku paldies..
demon3092
26 Jul 2012 - 10:57Cant seem to get by the 3/4 tutorial that you have made.
Could you email me please
drealms1986@gmail.com
cranks
04 Mar 2012 - 08:16cranks
04 Mar 2012 - 08:13Luke1234
13 Jan 2012 - 05:37however 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.