# Error: Notice: Undefined variable: res.php on lines 362, 408, 412

**URL:** https://forum.kirupa.com/t/error-notice-undefined-variable-res-php-on-lines-362-408-412/329606
**Category:** flash
**Created:** [September 21, 2012, 2:44pm UTC](https://forum.kirupa.com/t/error-notice-undefined-variable-res-php-on-lines-362-408-412/329606 "2012-09-21T14:44:22Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Scotty13](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Scotty13](https://forum.kirupa.com/u/Scotty13)
#### Post date: [September 21, 2012, 2:44pm UTC](https://forum.kirupa.com/t/error-notice-undefined-variable-res-php-on-lines-362-408-412/329606/1 "2012-09-21T14:44:22Z")

</div>

Error: Notice: Undefined variable: res.php on lines 362, 408, 412  
(Marked bold red below)

Notice: Undefined variable: passengerUserName in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 362  
Notice: Undefined variable: passengerFirstName in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 362  
Notice: Undefined variable: puname in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 408  
Notice: Undefined variable: pfname in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 408  
Notice: Undefined variable: pcity in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 412  
Notice: Undefined variable: pstate\_province in /home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 412  
Notice: Undefined variable: pcountry in  
/home/\*\*\*\*\*\*\*\*\*\*\*\*/res.php on line 412

$sqlName = mysql\_query(“SELECT username, firstname FROM myMembers WHERE id=’$value’ LIMIT 1”) or die (“Sorry we had a mysql error!”);  
while ($row = mysql\_fetch\_array($sqlName)) { $passengerUserName = substr($row[“username”],0,12); $passengerFirstName = substr($row[“firstname”],0,12);}  
[COLOR=#ff0000]\*\*362 \*\*[/COLOR] if (!$passengerUserName) {$passengerUserName = $passengerFirstName;} // If username is blank use the firstname programming changes in v1.32 call for this  
if ($i % 6 == 4){  
$passengerList .= ‘\<tr\>\<td\>\<div style=“width:106px; height:75px; overflow:hidden;” title="’ . $passengerUserName . ‘"\>  
\<a href="res.php?id=’ . $value . ‘"\>’ . $passengerUserName . ‘\</a\>\<br /\>’ . $psgr\_pic . ’  
\</div\>\</td\>’;  
} else {  
$passengerList .= ‘\<td\>\<div style=“width:106px; height:75px; overflow:hidden;” title="’ . $passengerUserName . ‘"\>  
\<a href="res.php?id=’ . $value . ‘"\>’ . $passengerUserName . ‘\</a\>\<br /\>’ . $psgr\_pic . ’  
\</div\>\</td\>’;  
}  
}  
$passengerList .= ‘\</tr\>\</table\>  
\<div align=“right”\>\<a href="#" onclick=“return false” onmousedown=“javascript:toggleViewAllPassengers(‘view\_all\_passengers’);”\>View Manifest\</a\>\</div\>  
\</div\>’;  
// END ASSEMBLE FRIEND LIST TO VIEW UP TO 6 ON PROFILE  
// ASSEMBLE FRIEND LIST AND LINKS TO VIEW ALL(50 for now until we paginate the array)  
$i = 0;  
$passengerArray50 = array\_slice($passengerArray, 0, 50);  
$passengerPopBoxList = ‘\<table id=“passengerPopBoxTable” width=“100%” align=“left” cellpadding=“6” cellspacing=“0”\>’;  
foreach ($passengerArray50 as $key =\> $value) {  
$i++; // increment $i by one each loop pass  
$check\_pic = ‘tktedmembers/’ . $value . ‘/image01.jpg’;  
if (file\_exists($check\_pic)) {  
$psgr\_pic = ‘\<a href="res.php?id=’ . $value . ‘"\>\<img src="’ . $check\_pic . ‘" width=“54px” border=“1”/\>\</a\>’;  
} else {  
$psgr\_pic = ‘\<a href="res.php?id=’ . $value . ‘"\>\<img src=“tktedmembers/0/image01.jpg” width=“54px” border=“1”/\>\</a\> &nbsp;‘;  
}  
$sqlName = mysql\_query("SELECT username, firstname, country, state\_province, city FROM myMembers WHERE id=’$value’ LIMIT 1") or die (“Sorry we had a mysql error!”);  
while ($row = mysql\_fetch\_array($sqlName)) { $puname = $row[“username”]; $pfname = $row[“firstname”]; $pcountry = $row[“country”]; $pstate\_province = $row[“state\_province”]; $pcity = $row[“city”]; }  
[COLOR=#ff0000] **408** [/COLOR] if (!$puname) {$puname = $pfname;} // If username is blank use the firstname programming changes in v1.32 call for this  
if ($i % 2) {  
$passengerPopBoxList .= ‘\<tr bgcolor="#F4F4F4"\>\<td width=“14%” valign=“top”\>  
\<div style=“width:106px; height:65px; overflow:hidden;” title="’ . $puname . ‘"\>’ . $psgr\_pic . ‘\</div\>\</td\>  
[COLOR=#ff0000] **412** [/COLOR] \<td width=“86%” valign=“top”\>\<a href="res.php?id=’ . $value . ‘"\>’ . $puname . ‘\</a\>\<br /\>\<font size="-2"\>\<em\>’ . $pcity . ‘\<br /\>’ . $pstate\_province . ‘\<br /\>’ . $pcountry . ‘\</em\>\</font\>\</td\>  
\</tr\>’;

Thanks, Scott
