SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jul 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Java - Database posting issue

    Hello Guys,

    I am having no luck with my post form to mysql. It is only posting the first letter of the word/phrase for the text input fields to the mysql database. It is a photo and text post form. The photo and only first letter of text are posting to database. Please note I am using Jqtouch, jquery, and phonegap.

    Thank you very much for any help. I have been putting hours with no luck.

    Here is my form fields:


    <input type="text" name="photo_caption[]" id="value1" src="" placeholder="Title value="" />
    <input type="text" name="photo_details[]" id="value2" src="" placeholder="Details" value="" />


    Here is my java script:

    var options = new FileUploadOptions();
    options.fileKey="photo_filename[]";
    options.fileName= "file.jpg";
    //options.mimeType="image/jpeg";


    var params = new Object();

    params.photo_caption = document.getElementById("value1").value;
    params.photo_details = document.getElementById("value2").value;

    options.params = params;

    var ft = new FileTransfer();
    ft.upload(imageURI, "http://www.mysite.com/upload.php", win, fail, options);

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="text" name="photo_caption[]" id="value1" src="" placeholder="Title value="" />
    You're missing a double quote after the word Title.

  3. #3
    SitePoint Member
    Join Date
    Jul 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey. Ya i accidently deleted the " when i edited the code for the post. It still doesnt work with the ".

    Any ideas??? Thanks!!

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Nope, no idea why upload.php isn't working since I have no idea what's in upload.php.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •