chizijs Posted May 26, 2010 Report Share Posted May 26, 2010 (edited) Komats! Edited May 26, 2010 by chizijs Quote Link to comment Share on other sites More sharing options...
gta1151 Posted May 26, 2010 Author Report Share Posted May 26, 2010 <?php $userid = $_GET['id']; $users = mysql_query("SELECT * FROM users WHERE id = '$userid'"); setcookie("$users", $value); setcookie("$users", $value, time()+3600); setcookie("$users", $value, time()+3600, "?", "Mana_lapa.lv", 1); ?> Kā izvadīt tur lasīju mēģināju tāpat nepieleca. Quote Link to comment Share on other sites More sharing options...
briedis Posted May 26, 2010 Report Share Posted May 26, 2010 (edited) Ou, man pat grūti komentēt... Cepuma nosaukums ir mysql resurss?? :)) Edited May 26, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted May 26, 2010 Report Share Posted May 26, 2010 o_O Paskaties ko vispar atdod mysql_query. To tu kukijā nepieglabāsi. Kam tev to vispār tur vajag? Ar ID pilnībā pietiktu. Tālāk - tev tāds $value vispār nepastāv. Re ku ir viss pilnībā paskaidrots http://uk2.php.net/setcookie (varbūt sapratīsi kur kas kā jāliek) Quote Link to comment Share on other sites More sharing options...
emsy Posted May 26, 2010 Report Share Posted May 26, 2010 <?php $expire = time()+60*60*24*365*5; // izgdzīvotājs cepums - 5 gadi, cerams nesapelēs xD setcookie('cepums','cepuma vērtība',$expire,'/',$_SERVER['http_host']); ?> Quote Link to comment Share on other sites More sharing options...
gta1151 Posted May 27, 2010 Author Report Share Posted May 27, 2010 (edited) Paldies emsy.Gribu pajautāt kā var piemēram lietotajs uztaisa iziet tad nepazūd cookie. Edited May 27, 2010 by gta1151 Quote Link to comment Share on other sites More sharing options...
gta1151 Posted May 29, 2010 Author Report Share Posted May 29, 2010 Baigi ilgi nesaņemu atbildi. Quote Link to comment Share on other sites More sharing options...
briedis Posted May 29, 2010 Report Share Posted May 29, 2010 Baigi ilgi nesaņemu atbildi. Jā, iedomājies, veselas 15 minūtes sestdienas (darba dienas) rītā neviens neatbild O_o Par sīkdatņu derīguma laiku - lasi manuāli. http://php.net/manual/en/function.setcookie.php Quote Link to comment Share on other sites More sharing options...
gta1151 Posted June 8, 2010 Author Report Share Posted June 8, 2010 (edited) Divi jautājumi: 1) Automātiski izvelk niku kuru ir ielogojies 2) Kā piešķirt id automātiski. Edited June 8, 2010 by gta1151 Quote Link to comment Share on other sites More sharing options...
briedis Posted June 8, 2010 Report Share Posted June 8, 2010 1) SELEC nick FROM 2) id kā ints ar auto_increment īpašību.. Quote Link to comment Share on other sites More sharing options...
gta1151 Posted June 8, 2010 Author Report Share Posted June 8, 2010 (edited) 1)Biju domājis savādāk,sāku veidot pievienot jaunumu scriptu bet nezinu ka dabūt automātiski izvada niku. 2)auto_increment nevajag speciālu scriptu kas izvada sava id. Edited June 9, 2010 by gta1151 Quote Link to comment Share on other sites More sharing options...
php newbie Posted June 8, 2010 Report Share Posted June 8, 2010 Biju domājis savādāk,sāku veidot pievienot jaunumu scriptu bet nezinu ka dabūt automātiski izvada niku. auto_increment nevajag speciālu scriptu kas izvada sava id. omfg tak nevar neko saprast Quote Link to comment Share on other sites More sharing options...
marrtins Posted June 8, 2010 Report Share Posted June 8, 2010 Kārtējais :) Quote Link to comment Share on other sites More sharing options...
gta1151 Posted June 9, 2010 Author Report Share Posted June 9, 2010 Ko never saprast. Quote Link to comment Share on other sites More sharing options...
Леший Posted June 9, 2010 Report Share Posted June 9, 2010 gta1151, ja tu gribi programmēt, tev nāksies iemācīties lietot pieturzīmes. Cilvēki varbūt tavs tekstus arī sapratīs, bet PHP tavu kodu - diez vai. 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.