Browser MMO Video#2
Re: Video#2
Sounds like a problem with youtube and your line. I would get that every so often on the random video.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video#2
try a different browser maybe?
Re: Video#2
Uh Oh 
cant get round this bloody parse error 0.o
I have looked at the code time n time again and compaired it to bothe the ones on the vid and in this thread. changed capitilization and nothin seems to be working
codes:
test.php
connect.php
Result:
n e 1 n e ideas on why this is bein ub0r gay??

cant get round this bloody parse error 0.o
I have looked at the code time n time again and compaired it to bothe the ones on the vid and in this thread. changed capitilization and nothin seems to be working

codes:
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'];
?>
Code: Select all
<?php
$db = mysql_connect("localhost","root","") or die("Could not connect to databade");
if(!$db)
die("No Database");
if(!mysql_select_db("tutorial",$db))
die("No Database Selected");
?>
Result:
Code: Select all
Parse error: parse error in G:\wamp\www\BrowserGame\test.php on line 5
New Site Coming Soon! Stay tuned 

- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Video#2
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']; ////cap the E
?>
EDIT: sorry looked at that wrong, the error is line 5 $playerinfo2. When you created the database in MySql, under players, did you create player1 or a different username? If you used a different username instead of player1, then you need to change player1 to the name you used.
Re: Video#2
i thought the error was on the "$playerinfo" line as thts line 5 in notepad++
but to answer your question yes everything is done by the book.

but to answer your question yes everything is done by the book.

New Site Coming Soon! Stay tuned 

- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Video#2
try this:
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'];
?>
Re: Video#2
well i really dont see wtf you changed other than "Email" in the array....
but never the less....
IT WORKED
spirit you is my savior ^^
may i kiss you as a gesture of my thankingness :p
oh btw i had to change Email back to email (unknown index error or summert).... so lol.... u musta changed smmert else but cnt see wot rofl.
but never the less....
IT WORKED

spirit you is my savior ^^
may i kiss you as a gesture of my thankingness :p
oh btw i had to change Email back to email (unknown index error or summert).... so lol.... u musta changed smmert else but cnt see wot rofl.
New Site Coming Soon! Stay tuned 

- SpiritWebb
- Posts: 3107
- Joined: Sun Jul 12, 2009 11:25 pm
Re: Video#2
The only thing I did was the line with $playerinfo = "select * from..." in yours to $playerinfo ="Select * from..." I just moved the " next to the =. But nevertheless, you are welcome, glad I could help!! 
kotc :p

kotc :p