 <p>Use <code>mysql_fetch_row()</code>to get the $amount_data.Mysql_query() returns only the resouce id</p> <pre><code>$amount_data = mysql_query ("SELECT * FROM subscriber WHERE payment_amount = '$payment_amount' AND id = '$id' "); $row = mysql_fetch_row($amount_data); echo $row[0]; </code></pre> <p>Check the link <a href="http://php.net/manual/en/function.mysql-fetch-row.php" rel="nofollow">http://php.net/manual/en/function.mysql-fetch-row.php</a></p>