Form html
phpcodice:<form method="POST" action="send.php"> <p align="center"> <textarea name="news" rows="8" cols="60"></textarea> <input type="submit" value="Pubblica" style="color: #08456B; font-weight: bold; width: 100"> </p> </form>
grazie millecodice:<?php include ("dati.txt"); mysql_connect($host,$user,$password); mysql_select_db("$db"); $mesi = array(1=>'Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre','Dicembre'); $giorni = array('Domenica','Lunedì','Marted','Mercoledì', 'Giovedì','Venerdì','Sabato'); list($sett,$giorno,$mese,$anno) = explode('-',date('w-d-n-Y')); $data=("$giorni[$sett], $giorno $mesi[$mese] $anno"); $news= $_POST['news']; $query = "INSERT INTO new(data, news) VALUES ('$data','$news')"; $result = @mysql_query ($query) or die("Errore:".mysql_error()); ?>![]()

Rispondi quotando