briedis Posted July 18, 2010 Report Share Posted July 18, 2010 Nu & ir jāraksta kā & Tas ir <a href="blabla.php?id=10&cat=sdsa&blabla=... Quote Link to comment Share on other sites More sharing options...
vitao.web Posted July 18, 2010 Author Report Share Posted July 18, 2010 Paldies par to stamp padomu ;) Tagad skatisos operatorus, lai pareizi uzrasktitu tavu paraugu tik php valoda :) Quote Link to comment Share on other sites More sharing options...
briedis Posted July 18, 2010 Report Share Posted July 18, 2010 es nepārbaudītu vai $id ir skaitlis, es viņu vienkārši par tādu pataisītu: $id = (int)$_GET['id']; Viss, kas nav pārtaisāms par veselu skaitli, būs 0. Un meklējot rakstu ar 0 - nekas netiks atrasts, un tas būtu arī vēlamais scenārijs. Tad if'ā tev būtu tikai jāpārbauda, vai $cat ir valīda kategorija. Quote Link to comment Share on other sites More sharing options...
vitao.web Posted July 18, 2010 Author Report Share Posted July 18, 2010 atradu ko tu biji domajis... un par to ka uzreiz noradu ka tas ir skaitlis ir laba ideja :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.