Undefined Variable: Not displaying data
<p>Ok basically trying to filter out records from an ID sent via POST.</p>

<p>Below is the funtion I am running.</p>

<pre><code> function displayinvoice($supid){
    $result = mysql_query("SELECT * FROM companies WHERE compID = " . $supid);
    $row = mysql_fetch_array( $result );
    return $row;
</code></pre>

<p>This is the on the page code</p>

<pre><code>include '../inc/functions-jams.php';

$dropid = $_POST['cmyid'];

displayinvoice($dropid);
</code></pre>

<p>And I have this in the body of the doc</p>

<pre><code>&lt;? echo $row['compName'];?&gt;
</code></pre>

<p>Now $dropid is picking up as I have echoed it out on the page but the body code is returning this error.</p>

<p>Notice: Undefined variable: row in C:\xampp\htdocs\yourwedding\backend\sup-invoices-02.php on line 59</p>

<p>Been at it for a few hours now and getting nowhere. Any help much appreciated.</p>
