Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Не виж как става..kriss каза:date("Y")PHP:$godina = date("Y"); if($godina=='2011'){ echo'Годината е 2011'; }else{ echo'Годината не е 2011'; }
<?
if($_POST['post']) {
$time = date("y.m.d H:i:s A");
$comment = strip_tags(trim($_POST['message']));
$avtor = strip_tags(trim($_POST['avtor']));
$ip = $_SERVER['REMOTE_ADDR'];
$year = date("Y");
if($year=='2011')
{
if(strlen($comment)<5)
{
echo "<div class='warning'> Прекалено кратък коментар ... </div>";
}
else
{
if(strlen($avtor)<3)
{
echo "<div class='warning'> Прекалено кратко име ... </div>";
}
else
{
$runq = mysql_query("INSERT INTO `commenta` (post_id, `comment`, avtor, time, ip) VALUES ('$row[post_id]', '$comment', '$avtor', '$time', '$ip')");
echo '<meta http-equiv=\"refresh\" content=\"2;\">';
}
}
}
else
{
echo'<div class="warning">Годината е грешна...</div>';
}
}
?>
<?
if($_POST['post']) {
$time = date("y.m.d H:i:s A");
$comment = strip_tags(trim($_POST['message']));
$avtor = strip_tags(trim($_POST['avtor']));
$ip = $_SERVER['REMOTE_ADDR'];
$year = date("Y");
if($year=='2011')
{
if(strlen($comment)>5)
{
if(strlen($avtor)>3)
{
$runq = mysql_query("INSERT INTO `commenta` (post_id, `comment`, avtor, time, ip) VALUES ('$row[post_id]', '$comment', '$avtor', '$time', '$ip')");
echo '<meta http-equiv=\"refresh\" content=\"2;\">';
}
else
{
echo "<div class='warning'> Прекалено кратко име ... </div>";
}
}
else
{
echo "<div class='warning'> Прекалено кратък коментар ... </div>";
}
}
else
{
echo'<div class="warning">Годината е грешна...</div>';
}
}
?>
<?
if($_POST['post']) {
$time = date("y.m.d H:i:s A");
$comment = strip_tags(trim($_POST['message']));
$avtor = strip_tags(trim($_POST['avtor']));
$ip = $_SERVER['REMOTE_ADDR'];
$year = date("Y");
if($year==2011)
{
if(strlen($comment)>5)
{
if(strlen($avtor)>3)
{
$runq = mysql_query("INSERT INTO `commenta` (post_id, `comment`, avtor, time, ip) VALUES ('$row[post_id]', '$comment', '$avtor', '$time', '$ip')");
echo '<meta http-equiv=\"refresh\" content=\"2;\">';
}
else
{
echo "<div class='warning'> Прекалено кратко име ... </div>";
}
}
else
{
echo "<div class='warning'> Прекалено кратък коментар ... </div>";
}
}
else
{
echo'<div class="warning">Годината е грешна...</div>';
}
}
?>