How can I make these three statements more secure against SQL injection?
<h2>1.</h2>

<pre><code>$con = mysql_connect("localhost","","");
if (!$con)
  {
      die('Could not connect: ' . mysql_error());
  }

mysql_select_db("jbell2", $con);

$sql="INSERT INTO Profile (username, Date, Height, Weight, WaistSize, WeightforHeight, Blood_Pressure, Medication, Total_Cholesterol, Bad_Cholesterol, Good_Cholesterol, Triglycerides,KidneyFunctionTest)
VALUES 

('$_Post[username]', '$_POST[Date]', '$_POST[Height]', '$_POST[Weight]', '$_POST[WaistSize]','$_POST[WeightforHeight]', '$_POST[Blood_Pressure]','$_POST[Medication]' ,'$_POST[Total_Cholesterol]' ,'$_POST[Bad_Cholesterol]' ,'$_POST[Good_Cholesterol]','$_POST[Triglycerides]','$_POST[KidneyFunctionTest]' )";
</code></pre>

<h2>2</h2>

<p>.</p>

<pre><code>          MySqlConnection con = new MySqlConnection("host="";user="";password=""; database="";");
            con.Open();
            MySqlCommand cmd = new MySqlCommand("INSERT INTO Patients(username, password, FirstName, SecondName, DiabetesType, Email,Phone, Phone2, Question1, Question2,TreatmentPlan)"
+ "values" + "('" + uname.Text + "','" + password.Text + "','" + fname.Text + "','" + lname.Text + "','" + Dtype.Text + "','" + email.Text + "','" + phone.Text + "','" + phone2.Text + "','" + q1.Text + "','" + q2.Text + "','" + treatment.Text + "')");
            cmd.Connection = con;
            cmd.ExecuteNonQuery();
            con.Close();
</code></pre>
