Browser MMO Video#2
Re: Video#2
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");
?>
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");
?>
Re: Video#2
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
-pmak
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video#2
thanks I appreciate that!
Re: Video#2
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
test.php
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
---------------------------------------------------------------------------------------------------------------------
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");
?>
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'];
?>
---------------------------------------------------------------------------------------------------------------------
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
Slav2
-
- Posts: 180
- Joined: Fri Apr 02, 2010 1:05 pm
Re: Video#2
The address your're going to,does not exist http://localhost/tutorial.test.php....it should probably be http://localhost/tutorial/test.php
-
- Posts: 180
- Joined: Fri Apr 02, 2010 1:05 pm
Re: Video#2
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.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Video#2
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
Re: Video#2
Hmmm I'm going to double check everything tomorrow but I think I had everything setup perfectly.
Thanks,
Slav2
Slav2
Re: Video#2
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
Slav2