1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

html javascript ajax php mysql live search ... help ...

Discussion in 'PHP' started by gether, Sep 23, 2013.

  1. #1
    [​IMG]
    [​IMG]

    [​IMG]

    [​IMG]

    please help me get it working ....
     
    gether, Sep 23, 2013 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    Well, show us YOUR code.


    Screenshots from w3school don't really help us
     
    GMF, Sep 24, 2013 IP
    ThePHPMaster likes this.
  3. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    first of all the original code was not written for mysql .... it was written to search an xml file...

    html
    ajax
    php
    xml

    $q = getelementbyid"livesearch.php?q=+str

    $q = strlen>0

    get q = strlen>0

    $q = stristr = xml

    $hint =
    $hint = "<a href = " "

    but this is what i want to see ...

    html
    ajax
    php
    mysql
    $q = getelementbyid"livesearch.php?q=+str

    $q = strlen>0

    get q = strlen>0

    $q = stristr = mysqltable



    $hint =
    $hint = "<a href = " "

    [​IMG]
    [​IMG]
     
    gether, Sep 24, 2013 IP
  4. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #4
    You....you want to see what?

    Your question makes pretty much no sense. Adding random screenshots also doesn't help.



    Do you want to build a search that queries MySQL and not XML?
     
    GMF, Sep 24, 2013 IP
    ThePHPMaster likes this.
  5. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    yes a live search ....

    html
    ajax
    .....php
    mysql


    <input type = "text" id = "livesearch"

    $q = getelementbyid "livesearch.php?q= +str

    $q = strlen>0

    get q = strlen>0

    $q = stristr = mysqltable

    $ hint =

    $ hint = "<a href = " "
     
    Last edited: Sep 24, 2013
    gether, Sep 24, 2013 IP
  6. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    http://www.w3schools.com/php/php_ajax_livesearch.asp
    Code (markup):
    ok.. bit of an update...

    ok .. this was part of a code that does live search ..in an xml file...

    i was planning it to modify for my need to search a mysql database table .. where it looks in the feild productname...

    i dont even know if it can be acheived in the long run at this rate ...

    the ajax should be able to call an element by id for processing ..

    in a scenario where more form feilds with id is involved ...

    as for ajax new xmlhttprequest needing a php file in the form of a url for processing data inside it ...

    i dont think i can get confused more than this especially when i saw the code where the ajax script fetches a php file... from the usual location of a webserver ... with the extra parameters... like

    livesearch.php?q=+str,true ..

    does that php file end like that ... ?

    if so .. is ajax in the firefox browser able to interpret the contents of that file ending with the unusual extension ?q=+str,true


    now strictly following the sample code...

    $q in php should be able to process the input feild document.getelementbyid('productname')

    because the ajax script is sending document.getelementbyid('productname')
    to the php file location ...

    where

    $q gets the document.getelementbyid('productname')


     
    gether, Sep 26, 2013 IP
  7. phpwreker

    phpwreker Greenhorn

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    you mean constant polling of the array ?


    [​IMG]
     
    phpwreker, Oct 11, 2013 IP
  8. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    an update ... this makes a bit more sense now ...

    [​IMG]

    [​IMG]
    [​IMG]

    [​IMG]
     
    gether, Jan 15, 2014 IP
  9. gether

    gether Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #9
    [​IMG]

    [​IMG]
     
    gether, Jan 20, 2014 IP