SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Concerning Ajax

  1. #1
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Concerning Ajax

    I have tried to find a good example of good solid database code or examples on the web.
    Either php or ajax with php will do. I even went to the IBM site, they have an ajax example where you enter the persons phone number and their delivery information comes up. But hereís what I am after.
    Letís use a trucking company as an example. You are adding a new load for a truck to pickup. When you get to the field CARRIER, you want to select a carrier from a dropdown box. However, there are over 7000 entries.
    Iíd like to have a small box next to dropdown where you can enter a search string, example wh. Now have the dropdown be based on a query from database with only carrier names with wh, i.e., white trucking, whitman enterprises inc. I can already achieve this in regular html/php, but using one page alone for a search string, which post to a carrierdd.php page, this page only has the dropdown properly filled, I choose a carrier then itís finally posted to carrier.php, in which the carrier info, contact person, phone and fax fields are plucked from the mysql database. As you can see there are 3 pages/screens just to get a carrier. I havenít even mentioned shipper dropdowns or consignee dropdowns yet. Every example in ajax that deals with getting information from a database seems to have the first field as text that you have to manually type in something like the phone example. Is there a way to have dropdowns in ajax that can do some of the above with only one page? If you know of examples somewhere please refer me. I can do dropdowns in php, but donít know how to implement them in ajax. Not an option list of a few items, but dropdowns with results from a database. Thanks

  2. #2
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like you would benefit from a rapid development framework. There are heaps available for PHP, so recommending any specific would be hard, but try having a look at symfony or prado for starters.


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
  •