airbus Posted August 15, 2009 Report Share Posted August 15, 2009 Sveiki, kāds var iedot skriptu, kad ir pieteikušas 8 komandas reģistrācijas poga pazūd Quote Link to comment Share on other sites More sharing options...
kechums Posted August 15, 2009 Report Share Posted August 15, 2009 if(mysql_num_rows($pieteikushaas_komandas) > 7) { pogu neraadam } Quote Link to comment Share on other sites More sharing options...
airbus Posted August 15, 2009 Author Report Share Posted August 15, 2009 Šita? <form action="" method="post"> <input type="submit" name="join" value="pievienoties"> </form> if(mysql_num_rows($pieteikushaas_komandas) > 7) { Nav vietu } Quote Link to comment Share on other sites More sharing options...
KarlisBa Posted August 15, 2009 Report Share Posted August 15, 2009 (edited) Nē. Pēc tā tev būtu form daļa jāliek else atribūtā, jo, ja rindas ir mazāk kā 8, tad tiks izpildīts else, ja tāds ir. Pēc tā ko tu uzrakstīji forma paliks abos gadījumos. Edited August 15, 2009 by KarlisBa Quote Link to comment Share on other sites More sharing options...
airbus Posted August 15, 2009 Author Report Share Posted August 15, 2009 (edited) Esmu izdarījis šadi if(($cup['team'] == 5)){ echo 'Nav brīvu vietu!'; } else{ echo '<input type="submit" value="Pievienoties" />'; } Viss iet, tikai viņš neko neraksta kad ir parsniegts 5komandas, bet vienkarši atļauj turpināt pievienoties Edited August 15, 2009 by airbus Quote Link to comment Share on other sites More sharing options...
Indian Posted August 15, 2009 Report Share Posted August 15, 2009 (edited) kas tajā cup['team'] ir? no kurienes izdabū rezultātu? uzraksti īsu tabulas aprakstu... tad varēs precīzāk palīdzēt P.S. es vēl iesaku uztaisīt pārbaudi servera pusē, jo tā es varu mierīgi bez tās pogas submitot caur kādu citu lapu utt.. . Edited August 15, 2009 by Indian Quote Link to comment Share on other sites More sharing options...
waplet Posted August 15, 2009 Report Share Posted August 15, 2009 Izskatāš , ka viņš grib kaut ko no kaut kā dabut Quote Link to comment Share on other sites More sharing options...
yeahz Posted August 16, 2009 Report Share Posted August 16, 2009 1) Kāpēc tur ir 2 iekavas? if(($cup['team'] == 5)) 2) $skaits = mysql_query("SELECT something FROM table WHERE a='e'"); if (mysql_num_rows($skaits) >= 8) { echo 'Nav brīvu vietu!'; } else { echo '<input type="submit" value="Pievienoties" />'; } 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.