Browser base game help

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
zannza95
Posts: 12
Joined: Mon Oct 21, 2013 10:39 pm

Browser base game help

Post by zannza95 »

<?php
include 'connect.php';

echo "text"
$piayerinfo = "select * from players where name = 'player1'";
$playerinfo2 = mysql_query($playerinfo) or die ("Could not select players");
$playerinfo3 = mysql_fetch_arrray($playerinfo2);
echo "Player1's email is". $playerinfo3['email'];
?>

heres my code
and im getting and error at ever line of $var and nothing is being put out to the screen, ive allrdy got the connect.php working.
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Browser base game help

Post by Epiales »

zannza95 wrote:<?php
include 'connect.php';

echo "text"
$piayerinfo = "select * from players where name = 'player1'";
$playerinfo2 = mysql_query($playerinfo) or die ("Could not select players");
$playerinfo3 = mysql_fetch_arrray($playerinfo2);
echo "Player1's email is". $playerinfo3['email'];
?>

heres my code
and im getting and error at ever line of $var and nothing is being put out to the screen, ive allrdy got the connect.php working.
try echo "text";

Maybe?
Nothing fancy, but a work in progress!

http://gameplaytoday.net
zannza95
Posts: 12
Joined: Mon Oct 21, 2013 10:39 pm

Re: Browser base game help

Post by zannza95 »

here is the http://www.christstruebride.com/worldof ... trance.php php file that is being used, i deleted it and still nothing is being posted, how would i use a die statement if there isn't finding a player1
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Browser base game help

Post by Epiales »

zannza95 wrote:here is the http://www.christstruebride.com/worldof ... trance.php php file that is being used, i deleted it and still nothing is being posted, how would i use a die statement if there isn't finding a player1
I'm still new to much of this, but you can echo playerinfo:

Code: Select all

echo "playerinfo";
and see what that gives you.

Might be able to debug this way...

Code: Select all

$piayerinfo = "SELECT * FROM 'players'";
$result = mysql_query($playerinfo ) or trigger_error(mysql_error()." ".$piayerinfo );
I don't know a lot, but things that I"ve had to do before... Might help ya
Nothing fancy, but a work in progress!

http://gameplaytoday.net
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Browser base game help

Post by Epiales »

zannza95 wrote:here is the http://www.christstruebride.com/worldof ... trance.php php file that is being used, i deleted it and still nothing is being posted, how would i use a die statement if there isn't finding a player1
Okay, change this:

$piayerinfo = "select * from players where name = 'player1'";

To this:

$playerinfo = "select * from players where name = 'player1'";
Nothing fancy, but a work in progress!

http://gameplaytoday.net
zannza95
Posts: 12
Joined: Mon Oct 21, 2013 10:39 pm

Re: Browser base game help

Post by zannza95 »

Okay, change this:

$piayerinfo = "select * from players where name = 'player1'";

To this:

$playerinfo = "select * from players where name = 'player1'";
Epiales

Posts: 509
Joined: Wed Aug 14, 2013 8:38 pm


i dont see the diffrence?
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Browser base game help

Post by Epiales »

zannza95 wrote:Okay, change this:

$piayerinfo = "select * from players where name = 'player1'";

To this:

$playerinfo = "select * from players where name = 'player1'";
Epiales

Posts: 509
Joined: Wed Aug 14, 2013 8:38 pm


i dont see the diffrence?
In your original query you have an " i " An eye.... Not an L

piayerinfo

I just changed it to an l for player ;)
Nothing fancy, but a work in progress!

http://gameplaytoday.net
zannza95
Posts: 12
Joined: Mon Oct 21, 2013 10:39 pm

Re: Browser base game help

Post by zannza95 »

it still does nothing i tried to echo out it ill try to query it on my connect server
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Browser base game help

Post by Epiales »

zannza95 wrote:it still does nothing i tried to echo out it ill try to query it on my connect server
echo "Player1's email is". $playerinfo3['email'];


No quotation at the end? it's written wrong... Should be:

Code: Select all

echo "Player1's email is $playerinfo3[email]";
Try that?
Nothing fancy, but a work in progress!

http://gameplaytoday.net
zannza95
Posts: 12
Joined: Mon Oct 21, 2013 10:39 pm

Re: Browser base game help

Post by zannza95 »

http://www.christstruebride.com/worldof ... onnect.php
this is what im getting when i simply call the $playerinfo = "Select * from players where name = 'player1'"
echo $playerinfo
Post Reply

Return to “Beginner Help and Support”