4 posters
tlgggggggggg
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°1
tlgggggggggg
salam...btl2 sy xde mslh besar skrg...nk mntk tlg sssgt2 kak n abg2 kt cni....sy wat web psal baba nyonya meseum online...mslhnye skrg sy xtau cmne nk wat form utk upload pic bsma dng penerangn utk bberapa pic....dlm web sy nie tebhgi pd 3 iaitu food,art, n pakaian baba nyonya dng mengunakn php ...cmne nk wat form utk msukn resepi brsama pic n pic2 bersma dng penerangan dlm section art n pakaian..harap sgt abang2 n kakak2 dpt membantu sy..smoga Allah swt mbls budi baik anda sume............
neology- Ahli Baharu
- Gender : Male Number of posts : 372
Age : 38
Registration date : 25/04/2009
- Post n°2
Re: tlgggggggggg
buat form biasa gune wysiwyg(What You See Is What You Get) editor..
mcm wordpress atau blogspot..
so, user bleh upload gmbr n buat susun atur note dgn mudah..
WYSIWYG Editor bleh tny uncle google..
bleh rujuk sini
mcm wordpress atau blogspot..
so, user bleh upload gmbr n buat susun atur note dgn mudah..
WYSIWYG Editor bleh tny uncle google..
bleh rujuk sini
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°3
Re: tlgggggggggg
thnx cz reply..nie bkn user upload pic tp upload pic n mklumt adlah tugas admin.....user juz bca je mklumt kt web....mslhnye cmne nk wat form php 2???
OngBok- Moderators
- Gender : Male Number of posts : 729
Location : Dungun Terengganu
Job/hobbies : Pesara JKR
Registration date : 18/02/2009
- Post n°4
Re: tlgggggggggg
aku sarankan guna joomla 1.5
neology- Ahli Baharu
- Gender : Male Number of posts : 372
Age : 38
Registration date : 25/04/2009
- Post n°5
Re: tlgggggggggg
nak buat form tu, check kat sini..
download then ikut je instruction dia..
download then ikut je instruction dia..
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°6
Re: tlgggggggggg
noelogy-----nk download yg mne 1???..cm byk je kt c2???...xbape fhm la...lect sy nk dlm dreamweaver n php mysql je
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°7
Re: tlgggggggggg
neology...........sy xfhm la cmne nk gune software yg awk bg 2....
neology- Ahli Baharu
- Gender : Male Number of posts : 372
Age : 38
Registration date : 25/04/2009
- Post n°8
Re: tlgggggggggg
form utk upload pic n description
code utk upload.php
cuba ni tgk..
- Code:
<form name="myform" method="post" action="upload.php" enctype="multipart/form-data">
<input type="file" name="myfile" size="30"><br>
<textarea name="description" rows="5" cols="300"></textarea><br>
<input type="submit" value="Upload" name="upload"><input type="reset">
</form>
code utk upload.php
- Code:
<?php
$filename = $_FILES['myfile']['name'];
$description = $_POST['description'];
if(isset($_POST['upload'])){
$target_path = "images/".$filename";
//var utk database
$username = 'username';
$password = 'password';
$database = 'database';
if(move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)){
$con = mysql_connect('localhost',$username,$password) or die("Error connecting to database");
mysql_select_db($con,$database);
$query = "INSERT INTO database.table (image,description) VALUES ('".$target_path."','".$description."')";
$exec = mysql_query($query);
echo "The picture is successfully uploaded with description";
}else{
echo "Error while uploading");
}
}else{
echo "Error : Please use the form";
}
?>
cuba ni tgk..
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°9
Re: tlgggggggggg
kod yg neo bg tu dh bleh pkai dh, tp kl nk lbh slmt ptt tmbh validation untk file yg di upload dan jgn lupa sanitize user input
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°10
Re: tlgggggggggg
sy dah wat code 2 tp xmsuk dlm databse la???
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°11
Re: tlgggggggggg
dh pastikan connection db sume btol?
name db n table dh btol ke?
ade kuar ape2 error x?
name db n table dh btol ke?
ade kuar ape2 error x?
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°12
Re: tlgggggggggg
sy cube test tdi tp die kuar msg nie....cmne erk???
[code]
Warning: Unable to create 'images/.[large][AnimePaper]wallpapers_Chobits_glassheart_33471.jpg': No such file or directory in c:\phpdev5\www\suke\upload.php on line 15
Warning: Unable to move 'C:\WINDOWS\TEMP\php1ED.tmp' to 'images/.[large][AnimePaper]wallpapers_Chobits_glassheart_33471.jpg' in c:\phpdev5\www\suke\upload.php on line 15
Error while uploading
[code]
Warning: Unable to create 'images/.[large][AnimePaper]wallpapers_Chobits_glassheart_33471.jpg': No such file or directory in c:\phpdev5\www\suke\upload.php on line 15
Warning: Unable to move 'C:\WINDOWS\TEMP\php1ED.tmp' to 'images/.[large][AnimePaper]wallpapers_Chobits_glassheart_33471.jpg' in c:\phpdev5\www\suke\upload.php on line 15
Error while uploading
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°13
Re: tlgggggggggg
try tukar line ni:
jd gini:
- Code:
$target_path = "images/".$filename";
jd gini:
- Code:
$target_path = "images/".$filename;
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°14
Re: tlgggggggggg
ape yg bezanye awk???
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°15
Re: tlgggggggggg
- Code:
?php
$filename = $_FILES['myfile']['name'];
$description = $_POST['description'];
if(isset($_POST['upload'])){
$target_path = "images/.$pic";
//var utk database
$username = 'username';
$password = 'password';
$database = 'database';
if(move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)){
$con = mysql_connect('localhost') or die("Error connecting to database");
mysql_select_db(suke);
$query = "INSERT INTO pic (image,description) VALUES ('".$target_path."','".$description."')";
$exec = mysql_query($query);
echo "The picture is successfully uploaded with description";
}else{
echo "Error while uploading";
}
}else{
echo "Error : Please use the form";
}
?>
tp bla display...xnmp pic pn..yg ade penerangan pic je..cmne???
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°16
Re: tlgggggggggg
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°17
Re: tlgggggggggg
err kne tgk keselurhn script ngan structure db la br senang
kl nk, zip kn sume tu n send kt email sy
nt sy tgkkn
johnburn@putera.com
kl nk, zip kn sume tu n send kt email sy
nt sy tgkkn
johnburn@putera.com
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°18
Re: tlgggggggggg
cmne erk..cz sy juz wat testing dulu..nk tgok jdi ke...mslh die kt dispaly image 2....sy amek code yg neology bg 2
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°19
Re: tlgggggggggg
antar la skali ngan structure db yg awk dh bt
nt sy btolkn
nt sy btolkn
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°20
Re: tlgggggggggg
awk..sy dah antr email kt awk..tq ye
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°21
Re: tlgggggggggg
xde pn. email ke johnburn@putera.com
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°22
Re: tlgggggggggg
awk xde email yahoo.....sy gune email yahoo utk antr email la
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°23
Re: tlgggggggggg
email yahoo pn bleh je send ke email tu
ni yahoo mail:
burn861221@yahoo.com
ni yahoo mail:
burn861221@yahoo.com
syira86- Ahli Baharu
- Gender : Female Number of posts : 108
Age : 37
Location : kedah
Job/hobbies : explore
Registration date : 04/03/2009
- Post n°24
Re: tlgggggggggg
sy dah antr...dpt x???
johnburn- Moderators
- Gender : Male Number of posts : 755
Location : Terengganu
Registration date : 07/03/2009
- Post n°25
Re: tlgggggggggg
xde pn
bak email nk try email
nt try reply dr situ
attch script tu skali ngan db die
bak email nk try email
nt try reply dr situ
attch script tu skali ngan db die