vorrei fare in modo che quando si inserisce un articolo nn si debba inserire la data manualmente, ma che venga inserita automaticamente quando vengo creato l'articolo.
il codice che ho per ora è:
Codice PHP:
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Insert</title>
        <meta content="text/html; charset=utf-8" http-equiv="content-type" />
        <script type="text/javascript" src="../ckeditor.js"></script>
        <script src="sample.js" type="text/javascript"></script>
        <link href="sample.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <?php
        
if (isset($_POST['inserisci'])) {
            include 
'../../config.php';
            
$link mysql_connect($host$user$password) or die("Non è possibile connettersi al server
"
);
            
$conn mysql_select_db($db$link) or die("Non è possibile connettersi al db
"
);
            
$title mysql_real_escape_string($_POST['title']);
            
$sectionid mysql_real_escape_string($_POST['sectionid']);
            
$testo mysql_real_escape_string($_POST['testo']);
            
$insert "INSERT INTO articoli2 (title, sectionid, testo) VALUES ('" $title "', '" $sectionid "', '" $testo "')";
            if (
$_POST['title'] == NULL || $_POST['sectionid'] == NULL || $_POST['testo'] == NULL) {
                echo 
"dati mancanti";
            } else {
                
mysql_query($insert) or die(mysql_error($link));
            }
        }
        
?>
        <h1>
        CKEditor Sample
        </h1>
        
        <div id="alerts">
            <noscript>
                


                    [b]CKEditor requires JavaScript to run[/b]. In a browser with no JavaScript
                support, like yours, you should still see the contents (HTML data) and you should
                be able to edit it normally, without a rich editor interface.
                </p>
            </noscript>
        </div>
        <div>
            <h3>Menu</h3>
            [url="../../index.php"]Home[/url]
        </div>
        <form action="#" method="post" name="inserisci">
            


                Title: <input type="text" name="title" />

            </p>
            


                <select name="sectionid">
                    <option value="linux">Linux</option>
                    <option value="mac&iphone">Mac</option>
                </select>
            </p>
            


                <textarea class="ckeditor" cols="80" id="editor1" name="testo" rows="10"></textarea>
            </p>
            


                <input type="submit" name="inserisci" value="Submit" />
            </p>
        </form>
    </body>
</html>
pensavo di creare un campo date del db, ma come faccio a inserire le date automaticamente?