Parašė avice· 2011 Bir. 7 12:06:44
#3
<?php
// prisijungimas prie <span style="border-bottom: 1px dotted black;">mysql</span>
echo "<form name='forma' method='post' action=''>
<textarea name='tekstas' id='tekstas'></textarea>
<input name='siusti' type='submit' id='siusti' value='Submit'>
</form>";
if(isset($_POST['siusti'])) {
mysql_query("INSERT INTO `tekstai` (tekstas)
VALUES ('".$_POST['tekstas']."')");
echo "Prideta";
}
$result = mysql_query("SELECT * FROM `tekstai`");
while($row = mysql_fetch_array($result))
{
echo $row['tekstas'];
echo "<br />";
}
?>
Redagavo avice· 2011 Bir. 7 12:06:24