Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Help nmn po Upload ng Image

ellirey

Apprentice
Advanced Member
Messages
72
Reaction score
0
Points
26
<?php



$uploadmsg = "";
//if upload button is pressed
if (isset($_POST['upload'])) {
$target = "images/".basename($_FILES['image']['name']);

//connect to the database
$db = mysql_connect("localhost", "root", "", "photo");

// get all the submitted data from the form
$image = $_FILES['image']['name'];
$text = $_POST['text'];


$sql = "INSERT INTO photo(image, text) VALUES ('$image', '$text')";
$result = mysql_query($db, $sql);

// move the uploaded image into the folder: images
if (move_uploaded_file($_FILES['image']['tmp_name'], $target)) {
$uploadmsg = "Image uploaded Successfully!";
}else {
$uploadmsg = "There was a problem uploading image";
}
}

?>

View attachment 307252

pa help nmn guys bkt gnun ung error :(
 

Attachments

  • error1.png
    error1.png
    14 KB · Views: 5
mysql_ function is already deprecated. switch to mysqli or PDO instead
 
sr thx sa reply opo MYSQLI di ko napansin na wla pla ung "i" kanina xD
 
Back
Top Bottom