title: Fatal error: Uncaught Error: Call to undefined function mysql_query()
body: <p>I am following a online tutorial to create a mini shopping cart, all is going well but now i am getting this error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to undefined function mysql_query()</p>
  </blockquote>
  
  <p>I cannot find any information anywhere on this error. Every time i google it ,solutions for:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to undefined function mysql_connect() </p>
  </blockquote>
  
  <p>appear.</p>
  
  <p>PHP</p>
  
  <pre><code> $id = substr($prod_name, 14, (strlen($prod_name) - 14));
   $get_query = mysql_query('SELECT Product_Id,Product_Name,Product_Price FROM Product WHERE Product_Id =' . mysql_real_escape_string((int) $id));
   while ($get_row = mysql_fetch_assoc($get_query)) {
   //subtotal
   $sub = $get_row['Product_Price'] * $value;
   echo $value . ' x ' . $get_row['Product_Name'] . ' @ ' . $get_row['Product_Price'] . ' ' . $sub . '&lt;br/&gt;';
              }
  </code></pre>
  
  <p>Is using <strong>mysql_query</strong> a bad idea? Where may have i/tutorial gone wrong? any help will be extremely helpful</p>