Jump to content
php.lv forumi

nesuta uz db.


Manual

Recommended Posts

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>';
					}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...