<?php // upis para if($_POST['tim1']!="" and $_POST['tim2']!="" and $_POST['tip']!="" and $_POST['kvota']!="" and $_POST['link']!=""){ $racun=$_SESSION['liga_user_id']; $result = mysql_query("select * from clanovi_njihovi_racuni where id='$racun';"); $row = mysql_fetch_array($result); $klikovi = $row['klikovi']; $tim1=str_ireplace(array("\"","'","<",">"),"",$_POST['tim1']); $tim2=str_ireplace(array("\"","'","<",">"),"",$_POST['tim2']); $tip=str_ireplace(array("\"","'","<",">"),"",$_POST['tip']); $kvota=str_ireplace(array(","),".",$_POST['kvota']); $link=$_POST['link']; $ip=$_SERVER['REMOTE_ADDR']; $tim1=strtolower($tim1);$tim1=ucwords($tim1); $tim2=strtolower($tim2);$tim2=ucwords($tim2); $link=str_ireplace(" ","",$link); $prvoslovo=str_ireplace("http://www.flashscore.com/","#",$link); $linkDozvola=0; if($prvoslovo[0]=="#")$linkDozvola=1; if($klikovi>2 and $linkDozvola==1 and $kvota>1 and $kvota<100){ $result = mysql_query("insert into clanovi_njihovi_parovi set racun='$racun',ip='$ip',datum=curdate(),vrijeme=curtime(),tim1='$tim1',tim2='$tim2', tip='$tip', kvota='$kvota',link='$link';"); $result = mysql_query("update clanovi_njihovi_racuni set klikovi = klikovi-0 where id='$racun'"); echo "<script>alert('Vas par je prihvacen')</script>"; } else if($klikovi<3)echo "<script>alert('Nemate dovoljan broj klikova za unos para(minimum je 3 klika po paru).')</script>"; else if($linkDozvola==0)echo "<script>alert('Vas link je neispravan. Link utakmice kopirajte sa http://www.flashscore.com .')</script>"; else if($kvota<1.01 and $kvota>99.99)echo "<script>alert('Kvota vam nije u opsegu od 1.01 do 99.99 .')</script>"; } ?>this is my php code for posts
currently its unlimited, i want to limit to 1 post per day.
the user must wait until 00:00 to post again
im not sure how would it look like with select query for the current day