Page 4 of 13
Re: Video#2
Posted: Tue Jul 14, 2009 12:00 pm
by Noctrine
Sounds like a problem with youtube and your line. I would get that every so often on the random video.
Re: Video#2
Posted: Tue Jul 14, 2009 1:32 pm
by hallsofvallhalla
try a different browser maybe?
Re: Video#2
Posted: Mon Aug 03, 2009 7:13 am
by Torniquet
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
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'];
?>
connect.php
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
n e 1 n e ideas on why this is bein ub0r gay??
Re: Video#2
Posted: Mon Aug 03, 2009 7:18 am
by SpiritWebb
All of your MySql database entries are correct? You created the "tutorial" database?
Re: Video#2
Posted: Mon Aug 03, 2009 7:34 am
by Torniquet
yep all the same
bloody thing lol
Re: Video#2
Posted: Mon Aug 03, 2009 7:47 am
by SpiritWebb
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
?>
Try capitalizing the "E" in email and see if that works
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
Posted: Mon Aug 03, 2009 8:14 am
by Torniquet
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.

Re: Video#2
Posted: Mon Aug 03, 2009 8:18 am
by SpiritWebb
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
Posted: Mon Aug 03, 2009 8:39 am
by Torniquet
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.
Re: Video#2
Posted: Mon Aug 03, 2009 8:51 am
by SpiritWebb
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