Browser MMO Video#2

Location of the Videos
Bust
Posts: 3
Joined: Sun Feb 07, 2010 12:22 pm

Re: Video#2

Post by Bust »

Great !!!
Your tutorials are great

:!: If your DataBase isn't called "Tutorial" put this code:
<?php

$db = mysql_connect("localhost","root","") or die("Could not connect to db");
if(!$db)
die("no db");
if(!mysql_select_db("YOUR DATABASE NAME HERE",$db))
die("No Database Selected");

?>
pmak
Posts: 1
Joined: Mon Sep 20, 2010 2:50 am

Re: Video#2

Post by pmak »

:D thank you so much for doing all of this, i'm pretty sure your the only guy out there doing it. Indie-Resource is awesome and really one of a kind. Keep on keeping on.

-pmak
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#2

Post by hallsofvallhalla »

thanks I appreciate that!
User avatar
Slav2
Posts: 96
Joined: Tue Jan 11, 2011 7:46 am

Re: Video#2

Post by Slav2 »

Hey guys. firstly i'd like to thank hallsofvallshalla for doing this.....thankyou :) i just started watching these and im allready getting errors.....ill post everything here, and if someone could tell me what im doing wrong i would really apretiate it..

connect.php

Code: Select all

<?php

$db = mysql_connect("localhost","root","") or die("Could not connect to db");
if(!$db)
die("no db");
if(!mysql_select_db("tutorial",$db))
die("No Database Selected");

?>
test.php

Code: Select all

<?php
include 'connect.php';

$playerinfo ="select * from players where name = 'player1'";
$playerinfo2 = mysql_query($playerinfo) or die ("could not select players");
$playerinfo3 = mysql_fetch_array($playerinfo2);

echo "Player1's email is " . $playerinfo3['email'];
echo "<br>Player1's id is " . $playerinfo3['id'];

?>
and then this is what pops up when i open firefox: (http://localhost/tutorial.test.php)

---------------------------------------------------------------------------------------------------------------------

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.
Error 404
localhost
1/11/2011 12:34:51 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

---------------------------------------------------------------------------------------------------------------------
Thanks,

Slav2
User avatar
Slav2
Posts: 96
Joined: Tue Jan 11, 2011 7:46 am

Re: Video#2

Post by Slav2 »

yea just tried that and it didnt work. :(
Thanks,

Slav2
alexander19
Posts: 180
Joined: Fri Apr 02, 2010 1:05 pm

Re: Video#2

Post by alexander19 »

As long as the test.php script is inside the tutorial folder and you're reaching it correctly,I cant really guess what the problem could be. :|
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Video#2

Post by Jackolantern »

Yes, you need to recheck your folder structure and make sure your links are equal to your folder and file structure. Are you sure you saved the file when you changed the period to a slash? That error means the WAMP server is not finding the file you are linking to. It is not an error in the PHP code itself.
The indelible lord of tl;dr
User avatar
Slav2
Posts: 96
Joined: Tue Jan 11, 2011 7:46 am

Re: Video#2

Post by Slav2 »

Hmmm I'm going to double check everything tomorrow but I think I had everything setup perfectly.
Thanks,

Slav2
User avatar
Slav2
Posts: 96
Joined: Tue Jan 11, 2011 7:46 am

Re: Video#2

Post by Slav2 »

man this is annoying....ive tried doing this already so many times and i just cant get the local host thing to work. same error everytime.
Thanks,

Slav2
Post Reply

Return to “Older Browser MMO Videos”