I'm using this form to add the title,link of the image and the text of the article to the database. I'm using type="text" for the image link,now,it's getting borring to upload an image on a external image upload service and copy the link.
Ben bu ile resim yüklemek ve veritabanı görüntünün LINK saklamak istiyorum.
Form:
<?php if (!$_POST["go"]){ ?>
<form method="post" action="">
<input name="article_title" type="text">
<input name="article_image_url" type="text"> <!-- i want here type="file" -->
<textarea name="article_text"></textarea>
<input type="submit" name="go" value="Submit">
</form>
<?php
} else {
$date=date("Y.m.d");
$title = $_POST["article_title"];
$image_url = $_POST["article_image_url"];
$text = $_POST["text"];
$sql="INSERT INTO articles (title,image_url,text,date) VALUES ('$title', '$image_url', '$text', '$date')";
if (mysql_query($sql)){
echo "done";}
else {echo "error<br>" . mysql_error();}}
?>
Bu bana yardımcı olun :)
ps: benim İngilizce için üzgünüm: $