Znaci imam stranicu Diskusija koju mozete pogledati na
www.kostajnik.com/diskusija.html na toj stranici hocu da ubacim formu za unos podataka a code je sledeci:
Code:
<?php
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
$fileLine = "Ime: " . $_POST['field_1'] . "
E-mail: " . $_POST['field_2'] . "
Mesto: " . $_POST['field_3'] . "
Komentar: " . $_POST['field_4'] . "
";
$filename = 'guestbook.html';
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a'))
{
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $fileLine) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
fclose($handle);
} else {
echo "The file is not writable";
}
include("confirm.html");
}
else {
echo "Invalid Captcha String.";
}
?>
e sad, podatke upisane u ovu formu zelim da mi ispisuje na drugoj stranici guestbook.html na odredjeno mesto i u odredjenoj formi, kao sto je na stranici
www.kostajnik.com/guestbook.html
Nadam se da sam sad malo jasniji.
P.S. hteo bih da ubacim i datum slanja komentara.