Forum Sementara Putera.com

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Forum Sementara Putera.com

Bersama kita perkemaskan forum ini sementara forum asal dalam pemulihan.

Forum putera dah kembali. Masalah sudah berjaya diselesaikan. Sila lawati http://forum.putera.com/tanya


4 posters

    tlgggggggggg

    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 3:48 am

    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............ Very Happy Sad
    neology
    neology
    Ahli Baharu
    Ahli Baharu


    Gender : Male Number of posts : 372
    Age : 38
    Registration date : 25/04/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by neology Sun Oct 11, 2009 4:43 am

    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
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 3:00 pm

    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
    OngBok
    Moderators
    Moderators


    Gender : Male Number of posts : 729
    Location : Dungun Terengganu
    Job/hobbies : Pesara JKR
    Registration date : 18/02/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by OngBok Sun Oct 11, 2009 5:13 pm

    aku sarankan guna joomla 1.5
    neology
    neology
    Ahli Baharu
    Ahli Baharu


    Gender : Male Number of posts : 372
    Age : 38
    Registration date : 25/04/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by neology Sun Oct 11, 2009 5:50 pm

    nak buat form tu, check kat sini..
    download then ikut je instruction dia..
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 7:14 pm

    noelogy-----nk download yg mne 1???..cm byk je kt c2???...xbape fhm la...lect sy nk dlm dreamweaver n php mysql je
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 7:51 pm

    neology...........sy xfhm la cmne nk gune software yg awk bg 2....
    neology
    neology
    Ahli Baharu
    Ahli Baharu


    Gender : Male Number of posts : 372
    Age : 38
    Registration date : 25/04/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by neology Sun Oct 11, 2009 8:22 pm

    form utk upload pic n description
    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
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Sun Oct 11, 2009 9:01 pm

    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
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 9:55 pm

    sy dah wat code 2 tp xmsuk dlm databse la???
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Sun Oct 11, 2009 10:09 pm

    dh pastikan connection db sume btol?
    name db n table dh btol ke?
    ade kuar ape2 error x?
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 10:10 pm

    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
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Sun Oct 11, 2009 10:16 pm

    try tukar line ni:
    Code:

    $target_path = "images/".$filename";

    jd gini:
    Code:

    $target_path = "images/".$filename;
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 10:39 pm

    ape yg bezanye awk???
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 10:41 pm

    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???
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Sun Oct 11, 2009 10:59 pm

    tlgggggggggg Picujr.th
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Mon Oct 12, 2009 12:20 am

    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
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Mon Oct 12, 2009 12:52 am

    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
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Mon Oct 12, 2009 12:59 am

    antar la skali ngan structure db yg awk dh bt
    nt sy btolkn
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Mon Oct 12, 2009 1:41 am

    awk..sy dah antr email kt awk..tq ye
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Mon Oct 12, 2009 1:44 am

    xde pn. email ke johnburn@putera.com
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Mon Oct 12, 2009 1:50 am

    awk xde email yahoo.....sy gune email yahoo utk antr email la
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Mon Oct 12, 2009 1:54 am

    email yahoo pn bleh je send ke email tu
    ni yahoo mail:
    burn861221@yahoo.com
    avatar
    syira86
    Ahli Baharu
    Ahli Baharu


    Gender : Female Number of posts : 108
    Age : 37
    Location : kedah
    Job/hobbies : explore
    Registration date : 04/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by syira86 Mon Oct 12, 2009 1:57 am

    sy dah antr...dpt x???
    johnburn
    johnburn
    Moderators
    Moderators


    Gender : Male Number of posts : 755
    Location : Terengganu
    Registration date : 07/03/2009

    tlgggggggggg Empty Re: tlgggggggggg

    Post by johnburn Mon Oct 12, 2009 2:06 am

    xde pn
    bak email nk try email
    nt try reply dr situ
    attch script tu skali ngan db die

    Sponsored content


    tlgggggggggg Empty Re: tlgggggggggg

    Post by Sponsored content


      Current date/time is Fri Mar 29, 2024 4:41 am