How to get date from mysql +30 days equal to today on php? : <p>I'm very lack of coding, so here my code before (get date from mysql = today --> alert) and I want to get help from y'all to make my code to (get date from mysql + 30 days = today --> alert)</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;?php 
                    $periksa=mysql_query("select * from tor where target_tor = curdate()");
                    while($q=mysql_fetch_array($periksa)){  
                        if ($q['target_tor'] = mysql_query("Select Curdate()")){
                            ?&gt;  
                            &lt;script&gt;
                                $(document).ready(function(){
                                    $('#pesan_sedia').css("color","red");
                                    $('#pesan_sedia').append("&lt;span class='glyphicon glyphicon-asterisk'&gt;&lt;/span&gt;");
                                });
                            &lt;/script&gt;
                            &lt;?php
                            echo "&lt;div style='padding:10px' class='alert alert-warning'&gt;&lt;span class='glyphicon glyphicon-info-sign'&gt;&lt;/span&gt; PERINGATAN !!  Deadline kontrak &lt;a style='color:red'&gt;". $q['nama_tor']."&lt;/a&gt; berakhir hariini!!&lt;/div&gt;"; 
                        }
                    }
                    ?&gt;    
                    &lt;/p&gt;</code></pre>
</div>
</div>
</p>
