lamerz Posted August 13, 2004 Report Share Posted August 13, 2004 katru reizi, kad palaizu failu atsauksmes.php parādās sekojosais: Notice: Undefined index: vards in d:\internets\home\localhost\www\atsauksmes.php on line 192 Notice: Undefined index: emails in d:\internets\home\localhost\www\atsauksmes.php on line 193 Notice: Undefined index: texts in d:\internets\home\localhost\www\atsauksmes.php on line 194 nekādi nevaru atbrīvoties no šiem uzrakstiem atsauksmes.php saturs: <form enctype="text" action=atsauksmes.php > <input name="vards" type="text" class="forma01"> <input name="emails" type="text" class="forma01"> <textarea name="texts" class="forma02"></textarea> <input type="image" name="pievienot" src="dizaina_elementi/pogas/pievienot1.gif" alt="Pievienot jaunu ierakstu" class="button"> </form> <? if(!@$pievienot) { $fp=fopen("ieraksti.txt","a"); fwrite($fp, "<b>".$_GET["vards"]."</b><br>"); fwrite($fp, "<b>".$_GET["emails"]."</b><br>"); fwrite($fp, $_GET["texts"]."<br><p>"); fclose($fp); unset($vards); unset($emails); unset($texts); $fp=fopen("ieraksti.txt", "r"); $saturs=fread($fp, filesize("ieraksti.txt")); fclose($fp); echo $saturs; unset($saturs); } ?> Link to comment Share on other sites More sharing options...
bubu Posted August 13, 2004 Report Share Posted August 13, 2004 Nu un kā lai mēs uzminam, kura ir 192 rindiņa? Visdrīzāk kļūda ir šeit: fwrite($fp, "<b>".$_GET["vards"]."</b><br>"); jo nav caur $_GET padots vards mainīgais. Tā vietā raksti: fwrite($fp, '<b>'.(isset($_GET['vards']) ? $_GET['vards'] : 'defaultais vards').'</b><br>'); Link to comment Share on other sites More sharing options...
lamerz Posted August 13, 2004 Author Report Share Posted August 13, 2004 :D Paldies, tagad viss sanaak! Link to comment Share on other sites More sharing options...
Recommended Posts