Notice Undefined variable row in .php file
Posted by: nala8cayenne (---.hsd1.ma.comcast.net)
Date: February 02, 2013 02:46AM

I had an older version of wamp installed in 2011 on another machine. I do not have the machine any longer.

The simple application allowed collection of results.

I recently installed WAMPSERVER 2.2 and the simple application no longer works. In both the old server and the new server, I took all the defaults and do not believe I have changed any configuration parameters.

It errors in each place I use php code in the simple web page. the error is, "Notice, Undefined variable row in .php file" A sample of html that errors is below, the error occurrs on the row that contains value=

:

<div class="fm-req">
<label for="StoryID"> StoryID:</label>
<select name="StoryID" id="StoryID" onblur="IsValid(StoryID)" onchange="getStory(this.value)" >
<option value=""> </option>
<? while($row=mysql_fetch_array($result))
{ ?>
<option
value= <?=$row['InternalID']?>><?=$row['InternalID']?>
</option>
<? } ?>
</select>
</div>

Any help appreciated.

Thanks,

Options: ReplyQuote
Re: Notice Undefined variable row in .php file
Posted by: nala8cayenne (---.hsd1.ma.comcast.net)
Date: February 02, 2013 04:39AM

Apparently the newer version is more picky about using <?php instead of <? . Added that as can seen below and error gone and works fine.


<div class="fm-req">
<label for="StoryID"> StoryID:</label>
<select name="StoryID" id="StoryID" onblur="IsValid(StoryID)" onchange="getStory(this.value)" >
<option value=""> </option>
<?php while($row=mysql_fetch_array($result))
{ ?>
<option value= <?=$row['InternalID']?>> <?=$row['InternalID']?> </option>

<?php } ?>
</select>
</div>

Options: ReplyQuote
Re: Notice Undefined variable row in .php file
Posted by: stevenmartin99 (Moderator)
Date: February 02, 2013 09:12AM

No it's always been like that - you can enable or disable short tags on the menu

Left click tray icon> php> settings> short open tags

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.