• (2 Pages)
  • +
  • 1
  • 2

Text Based Mafia Game || Usersonline/ Inside game Design part 4 We are going to look at the inside game design Rate Topic: ***** 1 Votes

#16 Tgrooms  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-April 12

Posted 12 April 2012 - 06:26 AM

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

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


Nevermind I figured it out.
Was This Post Helpful? 0
  • +
  • -

#17 Denis1  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 32
  • View blog
  • Posts: 102
  • Joined: 29-July 09

Posted 12 April 2012 - 09:13 AM

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?
Was This Post Helpful? 0
  • +
  • -

#18 Tgrooms  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 12-April 12

Posted 13 April 2012 - 08:02 PM

View PostDenis1, on 12 April 2012 - 09:13 AM, said:

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?

I figured it out. all good now.
Was This Post Helpful? 0
  • +
  • -

#19 terror1990  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-March 13

Posted 06 March 2013 - 11:41 AM

I have a error can someone help me?


PHP Error Message

Warning: require(Safe.php) [function.require]: failed to open stream: No such file or directory in /home/a9949819/public_html/sample.php on line 1

Free Web Hosting

PHP Error Message

Fatal error: require() [function.require]: Failed opening required 'Safe.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a9949819/public_html/sample.php on line 1

my sample.php

<?php require("Safe.php"); ?>


<html>
<body>


WELCOME



<a href="index.php">LogOut</a> 



<body>
<html>





my safe.php

<? include_once("connect.php"); ?>
<?
if(isset($_SESSION['user_id'])) {
 // Login OK, update last active
 
 $sql = "UPDATE users SET lastactive=NOW() WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'";
 mysql_query($sql);
 
}else{
   header("Location: index.php");
     exit();
 }
?>

This post has been edited by Atli: 07 March 2013 - 09:48 AM
Reason for edit:: Use [code] tags when posting code.

Was This Post Helpful? 0
  • +
  • -

#20 Shadowing  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 35
  • Joined: 26-November 11

Posted 06 March 2013 - 12:29 PM

Hey terror those errors are telling you that your safe.php file is not in the correct folder. Hmm try require(/safe.php) and let me know
Was This Post Helpful? 1
  • +
  • -

#21 terror1990  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-March 13

Posted 07 March 2013 - 09:42 AM

View PostShadowing, on 06 March 2013 - 12:29 PM, said:

Hey terror those errors are telling you that your safe.php file is not in the correct folder. Hmm try require(/safe.php) and let me know


now i get: Fatal error: require() [function.require]: Failed opening required '/Safe.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a9949819/public_html/sample.php on line 1
Was This Post Helpful? 0
  • +
  • -

#22 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,965
  • Joined: 08-June 10

Posted 07 March 2013 - 09:52 AM

Safe.php and safe.php are not the same thing on Unix. If your file is named using all lower case letters, your include/require statements must match that.
Was This Post Helpful? 2
  • +
  • -

#23 terror1990  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-March 13

Posted 07 March 2013 - 09:57 AM

View PostAtli, on 07 March 2013 - 09:52 AM, said:

Safe.php and safe.php are not the same thing on Unix. If your file is named using all lower case letters, your include/require statements must match that.


ty :sweatdrop:
Was This Post Helpful? 0
  • +
  • -

#24 Shadowing  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 35
  • Joined: 26-November 11

Posted 07 March 2013 - 10:11 AM

View Postterror1990, on 07 March 2013 - 09:57 AM, said:

View PostAtli, on 07 March 2013 - 09:52 AM, said:

Safe.php and safe.php are not the same thing on Unix. If your file is named using all lower case letters, your include/require statements must match that.


ty :sweatdrop:/>/>



Did that solve your issue terror?
Best pratice is to always use lower case like the guy above said. file names/ variables. If there are variables in this tutor that isnt lower case i would change that as well. Makes life alot easier.
Was This Post Helpful? 0
  • +
  • -

#25 terror1990  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 6
  • Joined: 06-March 13

Posted 07 March 2013 - 11:12 AM

View PostShadowing, on 07 March 2013 - 10:11 AM, said:

View Postterror1990, on 07 March 2013 - 09:57 AM, said:

View PostAtli, on 07 March 2013 - 09:52 AM, said:

Safe.php and safe.php are not the same thing on Unix. If your file is named using all lower case letters, your include/require statements must match that.


ty :sweatdrop:/>/>/>



Did that solve your issue terror?
Best pratice is to always use lower case like the guy above said. file names/ variables. If there are variables in this tutor that isnt lower case i would change that as well. Makes life alot easier.


yes its work

thank you
Was This Post Helpful? 0
  • +
  • -

#26 smudgeit  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-March 14

Posted 18 March 2014 - 06:03 PM

i have followed up to here but now i get

Notice: Undefined property: stdClass::$profile in C:\xampp\htdocs\mafia\Safe.php on line 30
Table 'maffiagame.sitestats' doesn't exist

can someone help please
Was This Post Helpful? 0
  • +
  • -

#27 dongangsters  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 04-May 14

Posted 06 May 2014 - 01:10 AM

this comes up when i login to my game please help $sql = "SELECT * FROM users "WHERE" "1"='".mysql_real_escape_string($_SESSION['user_id'])."'"; $query = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($query); $id = htmlspecialchars($row->id); $mail = htmlspecialchars($row->mail); $userip = htmlspecialchars($row->userip); $name = htmlspecialchars($row->name); $password = htmlspecialchars($row->password); $sitestate = htmlspecialchars($row->sitestate); $money = htmlspecialchars($row->money); $exp = htmlspecialchars($row->exp); $rank = htmlspecialchars($row->rank); $health = htmlspecialchars($row->health); $points = htmlspecialchars($row->points);

:)
Was This Post Helpful? 0
  • +
  • -

#28 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,965
  • Joined: 08-June 10

Posted 07 May 2014 - 04:11 AM

If it's printing the code to the page, there is something wrong with your HTTP server. Make sure it can actually execute PHP code.
Was This Post Helpful? 0
  • +
  • -

#29 Hawaii12  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-July 14

Posted 12 July 2014 - 11:29 PM

hello denis1
how can I contact you?

Thanks.
Amer
Was This Post Helpful? 0
  • +
  • -

#30 Shadowing  Icon User is offline

  • New D.I.C Head

Reputation: 4
  • View blog
  • Posts: 35
  • Joined: 26-November 11

Posted 13 July 2014 - 03:58 AM

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

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


You probably have a file included or required twice
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2