|
Posted by Schraalhans Keukenmeester on 04/25/07 08:25
Schraalhans Keukenmeester wrote:
> jsgoodrich@gmail.com wrote:
>> I am looking for some help if anyone can lend a hand.
>>
>> I have a simple php website that displays a table from my mysql
>> database.
>>
>> To prep for my MCSE I moved my home server to Windows 2003 Standard, I
>> installed mysql and php 5 to run some of my databases and websites.
>>
>> Under Linux the site worked fine, under windows I keep getting Notice
>> Undefined Index error on line 67
>>
>> I have went back to the basics just pull the data then display and
>> still get the same error.
>>
>> 60 $sql = "SELECT * from newschool ORDER BY State, CollNam";
>> 61
>> 62 $result = mysql_query($sql, $dbcnx) or die(mysql_error());
>> 63 $number_of_rows = mysql_num_rows($result);
>> 64
>> 65 while ($newArray = mysql_fetch_array($result)) {
>> 66
>> 67 $id = $newArray['id'];
> ^^
> id, without a $, is a constant. Yet you probably haven't defined that in
> your code prior to using it. (I suspect this is a typo though, yes?)
> If you have error reporting set to E_ALL, besides warnings and errors,
> you'll get notices as well.
>
> HTH
>
> Sh.
>
Skip that, I'm not awake yet.
Is 'id' a valid field in your db?
Try var_dump($newArray) to see what is returned from the db.
Navigation:
[Reply to this message]
|