Manual Posted September 16, 2010 Report Share Posted September 16, 2010 Kads nezin kas pa vainu? Pilnigi nekada reakcija. if(isset($_POST['comment'])) { $text = $_POST['text']; $pied = $_POST['pied']; $name= $_POST['name']; $pic_id = $_GET['pic_id']; mysql_query("INSERT INTO comment (text, name, pied, pic_id) VALUES('$text', '$name', '$pied', '$pic_id')")or die(mysql_error()); echo '<div id="comment"><div id="bx" style="width:710px;" > <div id="bx" style="float:left;margin-right:7px;"><img src="images/hz.png" width="80"/></div> <div id="bx" style="float:left;padding:1px;background-image:url(images/bxbg.png);color:#fff;width:595px;padding-left:5px;font-size:13px;">Vārds: <input type="text" class="inp" name="name" /> , '.date("t. M, H:s").'</div> <textarea style="position: relative; width:600px;" class="inp" tabindex="1" name="text" rows="3"></textarea></br></br> <input type="radio" name="pied" value="kitelis" style="margin-top:-15px;" /> Esmu no ķiteļa.</br> <input type="radio" name="sex" value="guest" /> Ķiteļa draugs / Ciemiņš <input src="images/add.png" name="comment" value="Submit" style="float:right;margin-top:3px;margin-right:3px;" type="image"> </div></div>'; }else{ echo '<div id="comment"><div id="bx" style="width:710px;" > <div id="bx" style="float:left;margin-right:7px;"><img src="images/hz.png" width="80"/></div> <div id="bx" style="float:left;padding:1px;background-image:url(images/bxbg.png);color:#fff;width:595px;padding-left:5px;font-size:13px;">Vārds: <input type="text" class="inp" name="name" /> , '.date("t. M, H:s").'</div> <textarea style="position: relative; width:600px;" class="inp" tabindex="1" name="text" rows="3"></textarea></br></br> <input type="radio" name="pied" value="kitelis" style="margin-top:-15px;" /> Esmu no ķiteļa.</br> <input type="radio" name="pied" value="guest" /> Ķiteļa draugs / Ciemiņš <input src="images/add.png" name="comment" value="Submit" type="image" style="float:right;margin-top:3px;margin-right:3px;"> </div></div>'; } Quote Link to comment Share on other sites More sharing options...
briedis Posted September 16, 2010 Report Share Posted September 16, 2010 (edited) Kļūdu ziņojumu rādīšana ir ieslēgta? (error_reporting) Edited September 16, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
spainis Posted September 16, 2010 Report Share Posted September 16, 2010 (edited) var_dump($_POST) un pārliecināmies, ka POST datos indekss 'comment' nemaz nav ;) Edited September 16, 2010 by spainis Quote Link to comment Share on other sites More sharing options...
Manual Posted September 16, 2010 Author Report Share Posted September 16, 2010 Nekadas kludas nemet. Quote Link to comment Share on other sites More sharing options...
Val Posted September 16, 2010 Report Share Posted September 16, 2010 pieliec form tagus. 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.