Page 5 of 13

Re: Video#2

Posted: Mon Aug 03, 2009 1:20 pm
by hallsofvallhalla
i dont see how that worked, white space doesn't matter. very weird :)

Re: Video#2

Posted: Mon Aug 03, 2009 1:24 pm
by Torniquet
was just lookin @ it again...

think i found where i ballsed up XD

by the looks of it...

from my code... i left out a semi-colon @ the end of the include ¬¬

I IS MEGA PENIS :(

n e waysssssss

lesson lernt :p

Re: Video#2

Posted: Mon Aug 03, 2009 1:34 pm
by hallsofvallhalla
haha that was it! Dude I have done that so many times its not funny

Re: Video#2

Posted: Mon Aug 03, 2009 5:59 pm
by SpiritWebb
WOW...I didn't even notice the semicolon missing. LOL! Guess thats what I get for late night programming...

Re: Video#2

Posted: Thu Aug 13, 2009 4:50 am
by Volthian
OK, so I copied everything the same way that you did in the test.php file, but I keep getting this error message: Fatal error: Call to undefined function myaql_connect() in C:\wamp\www\Tutorial\test.php on line 3. I don't know what to do about it! But, I am pretty sure it has something to do with the third line. Here is what I copied from your video:
<?php
include 'connect.php';

$playerinfo = "select ' from players where name = 'player 1'";
$playerinfo2 = mysql_query($playerinfo) or die "Couldn't select players");
$playerinfo3 = mysql_fetch_array($playerinfo2);

echo "player 1's email is" . $playerinfo3['email'];


So, if you could help me out, I would really appreciate it.
Thanks!

Re: Video#2

Posted: Thu Aug 13, 2009 5:05 am
by Noctrine
In your connect.php it should be mysql_connect, not myaql connect.

Re: Video#2

Posted: Fri Aug 14, 2009 6:21 pm
by Volthian
OK, so I fixed the mysql thing, but now when I go to load the page, nothing shows up. Here are both of the files I have down. Here is the Test.php File: <?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");

?>

And here is the Connect.php File:<?php
include 'connect.php';

$playerinfo = "select ' from players where name = 'player 1'";
$playerinfo2 = mysql_query($playerinfo) or die "Couldn't select players");
$playerinfo3 = mysql_fetch_array($playerinfo2);

echo "player 1's email is" . $playerinfo3['email'];


can anyone help me out with this? I mean, I have no idea what I did wrong. Because as far as I am concerned, I copied everything correctly. But, I don't want to continue to video three until I get this right. So, if anyone can help me out, I would greatly appreciate it. Thanks.

Re: Video#2

Posted: Fri Aug 14, 2009 7:25 pm
by hallsofvallhalla
you just get a white page when you go to test.php? Are you using vista?

Re: Video#2

Posted: Fri Aug 14, 2009 8:05 pm
by Volthian
No. Im not using vista, but I just get a white page.

Re: Video#2

Posted: Fri Aug 14, 2009 8:11 pm
by hallsofvallhalla
i noticed you have it labeled backwards above, you have what should be in test is in connect and vise versa, is this a mistake or is it really like that?