Why can't I find the answer to this anywhere?

Hi, please help a beginner...
I'm trying to build an online catalog with PHP and MySQL, using Dreamweaver.
I have a problem with filters... here it is:
I have some variables... let's take 1 for ex. $manuf in which I want to store the manufacturer (for the notebooks table, like "acer", "alienware" etc.).
I figured I'll do the filters one of 2 ways:
1. through dropdown list/menu and I've populated the list with the values "acer" "alienware" etc.
and in "OnChange" event of the list/menu I want to assign the selected value of the list/menu to the variable $manuf.
HOW do I do this??? I can't find anything like a property list1.selected for ex. to simply write <?php $manuf = list1.selected ?>
where list1. should be the name of the list/menu (right?...)
or
2. it looks nicer with a SpryMenu.
So I have a Spry Menu like "Manufacturer" etc.
And Submenus like "Acer", "Alienware" etc.
now... when I click the submenu labeled "Acer" I can just do the php $prod = "acer" BUT HOW can I also change the menu's caption to say "Manufacturer - Acer" instead of just "Manufacturer" ??? ('cause I want people to see what filter is applied). Again, I can't find any property like sprymenu1.caption or something like that.
P.S.
regarding the list/menu... I can populate it dynamically, from the database... with the values from $manuf field. BUT they repeat, because there are more than 1 "acer" for ex. in the catalog (database). HOW can I dynamically populate the list from the database, without repeating any value???

For the time being I think I am going to start with just problem 1 because I think as I go through explaining this to you, the answer to #2 will become more clear.
Javascript is like Actionscript (Flash) and can be executed in runtime meaning that if you execute javascript on a page you can see the results immediately.  PHP, on the other hand, is a preprocessor meaning that the code is executed prior to a page load and cannot be executed in runtime like Javascript can.  Your mix of the two for this instance is really not needed unless you want the form to act dynamically.  Because of this there are 2 ways  to approach the situation:
1.  If you want to stick with PHP, when you submit the form, the values of the stored will be stored in the global variables ( http://php.net/manual/en/reserved.variables.php ).  Based on the method of your form will depend on how you extract the data.  For instance, if your form method is "POST" and the drop-down field named "manuf" has a value of "Dell", then when you submit the form, the variable $_POST['manuf'] will be equal to "Dell".
With this example the form has to be submitted because Javascript cannot send commands to PHP once the page has been loaded because the PHP has already been executed.
2.  This way is a lot more complicated so I won't go into much detail.  But, the Spry Dataset functions are intended for updating data live without the need to submit a form forcing a page refresh for the PHP to execute.  What happens with the Spry dataset is that you store all the information in mySQL and then the Spry Dataset will convert this into XML for you. PHP will be used to run the initial query of your database and depending on the size of your database can be used to filter the data so you do not end up with an extremely large XML file slowing your page load time.  I do have a basic example I did awhile back located here ( http://www.exitplaystation.com/warhawk/trophies.php ).  That used a static XML document at the time.  I do have a more dynamic example.  It was actually done for work, but I might be able to modify it with bogus information and upload it to show you a dynamic version.  In the meantime if you want to see a professional example of this in action:
http://msn.foxsports.com/nfl/draft-tracker#round=1&team=ALL&school=ALL&position=ALL
FoxSports uses the Spry Dataset sort functions and some extra code for their live NFL draft system.  Refreshes automatically and sorts from the top drop-down menus.  So as you can see all of their data is loaded from their database connection and refreshed in real-time.  This is a very complicated example and requires modifications to the Spry code, but it shows the power of what Spry can do.
Let me know which way you would prefer to go with this.  Personally I would recommend #1 for starters until you get going and feel more comfortable with PHP and Javascript.  Also if you give more a little more detail on your code I could help you implement it if you are having difficulty understanding.

Similar Messages

  • I can't find the answer for this anywhere on the internet...please help

    I am trying to learn some things that arent taught to me in class and I would say that I am a beginner, but I have a solid knowledge base of the syntax of java. I am trying to make a program that will log into my gmail account for me. I have to do a presentation at the end of the semester and I would like to take the input from the user and log into gmail by outputting the input taken into the gmail login textboxes. Is this done through source or is it something different. I know this seems pointless, but I think it is fun to learn new things in this language. I can always make it more usefull for myself if I go back and make my usename and password static or final within my class. If anyone can help me or at least tell me what classes in the API would be helpfull for this that would be great. Thanks.

    Thanks for the reply kitty...I guess I am not as good as I thought because I don't really know how to impliment this and truely understand it. How long have you been programming java?

  • I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it.  I want to come back to the previosu version.  why is it so complicated.  Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.

    I have upgrade ios 6 to ios7 on my iphone 5.  I do NOT like it at all.   I want to come back to the previous version.  why is it so complicated? Why can I not find the instruction strait from apple? This is the worst possible upgrade ever.  It make me think of when ericsson got sold to Sony....drastic PC change.
    I would like to have simple instruction on how to downgrade.
    It feel like a change that I did not ask for , ok I push the upgrade buttom, but really this is the worst update aver!
    HELP!

    iPhone User Guide (For iOS 7 Software)Sep 20, 2013 - 23 MB

  • Why can't I find the Illustrator CC 2014 toolbar on my screen on Windows 7?

    Why can't I find the Illustrator CC 2014 toolbar on my screen on Windows 7? The screen resolution is 1280 x 1024.

    Hi Chris,
    Can you please put a snapshot of the screen so that we can know more about the issue ?
    Thanks & Regards,
    Raghuveer

  • HT4623 Why can't I find the Software Update button?  I only see About and Usage.

    Why can't I find the Software Update button?  I only see About and Usage.

    Under About, what version do you have? The Software Update option in Settings was not introduced until iOS 5.0.

  • Why can't i find the airplay key on my new ipad. i have hit the home key twice and scrolled but it's not there?

    Why can't i find the airplay button on my new ipad? I've hit the home key twice and scrolled left but it's not there any clues please?

    Look through this suppport document.  You'll probably find a solution.
    Using AirPlay, http://support.apple.com/kb/HT4437

  • Why can't i find the instagram app for ipad in the App Store?

    why can't I find the instagram app in the App Store for the ipad?  There is one for the iphone...

    Perhaps because the "Instagram" App is optimized only for the iPhone 5 currently and there is no Instagram App for the iPad only at this time???
    I don't see one listed in the U.S. App Store.

  • Why can't I find the pen tool in the tryout version of Illustrator CC?

    Why can't I find the pen tool in the tryout version of Illustrator CC?

    No clue. You've provided nearly no information.
    What happens when you tap the P key on the keyboard?

  • Why can't I find the color profile info in the library ?

    Why can’t I find the color profile info in the library ?
    It’s sometimes necessary to convert to sRGB for some applications ( internet, some beamers in clubs,…).
    I convert them but afterwards it is nice to have the possibility to check this out and should be possible in lightroom, the info is present why not showing it ( it is not so easy to go in finder and look at it in info for every image)?
    Since I’m always working in Adobe profile for printing and so this is important to know !
    But no trace of it anywhere….
    Thx for any reply.

    The disconnect here is many (including me) don't reimport rendered JPEGs
    into our Lightroom Catalogs. Why you are doing that is beyond me. You
    have the original and can recreate any rendered file at any time.
    Storing the derivative JPEGs is redundant, creates additional confusion
    and serves little real purpose. Exported versions are considered
    discarable by many.
    Yes, understand what you're meaning. but the fact is that I started rather recently with lightroom. So my images where classified in directory's and subdirectory's...already.
    I think that this is the major problem. This is always a problem when you step in a new system.
    Let's say I am going to submit to a photographic society, I have an Export
    preset created that exports to proper size and color space for
    projection. It creates a file. I send it to the club. Then I delete it.
    Why save it? I can recreate it. Then I don't have to manage it, search
    for it, or worse yet, risk confusion with my original file or othe
    resultant derivatives. 
    The fact that I like to keep them is
    indeed an inborn result of the "pré-lightroom period". A bad habitude
    indeed. I'm thinking now of deleting them, will maybe better. On the other side
    I still have them just for me in order to know which ones I used and when.
    Another bad habitude.
    But
    since I'm not a professional photographer I'm mostly confronted with the time
    issue and it is for me easier to take existing files ready for use...
    ( doesn't mean you’re not confronted
    with this problem
    Today place for jpeg's is rather easy since the Gb's are almost free...
    Same is true of a client photo. They want an 8x10. I go to the retouched
    original, create a JPEG from an 8x10 preset in the proper dimensions and color space. Send it to the lab. Then, I can delete it.
    One of the strengths of Lightroom is that it creates many fewer
    intermediate file versions along the way toward final creation. Another
    strength is that you can save (via snapshots in Develop) your
    derivatives, export, and discard them without having to create, import
    and manage additional files on disk. In the old days of just Photoshop
    you might end up with a dozen or more files on your disk for every
    worked file. With Lightroom, you only need one or two.
    Will look deeper in your proposed workflow...and yes I'm comming from the old days.
    That said, if you want to keep the derivatives for purposes down the road,
    that is up to you but I don't understand why they need to be inserted
    into your catalog.
    Since my catalog is made in the time
    from before lightroom I’m still having all these directory's and
    subdirectory's...
    Easier
    for me since even with back-ups of the catalogue still afraid for crashes. And
    I keep liking these directory structure because for the moment it's lighrtroom
    and tomorrow it can be another program, you never know. It's like a website, "on line versoin only", big problem when a firm at some moment stop to provide this possibility.
    I think I will try to go deeper in "how to use lightroom better..."
    thanks
    Edward De Bruyn

  • Why can't I find the getting started file on my desktop?

    Why can't I find the getting started file on my desktop? I know the name is different in the video, but the folder itself is not sowing up after i download it and try to create the site.

    Can someone please help me with my question?
    I'm trying to remove private browsing from my computer and I need to find the "MainMenu.nib" file... when I go to that directory it isn't there.
    I'm running Yosemite.

  • Why can I not separate the stupid "Bookmark This Page" Star from "Show your Bookmarks"? I never use that Star

    Why can I not separate the stupid "Bookmark This Page" Star from "Show your Bookmarks"? I never use that star and now it's all I click on when trying to open my Bookmarks. Very annoying

    If you want to remove the ★ star icon,
    # Install Stylish and restart Firefox when prompted.
    #* https://addons.mozilla.org/firefox/addon/stylish/
    # Click the ≡ Menu Button and choose Add-ons.
    # In the Add-ons Manager, click User Styles on the left.
    # Click the Write New Style button at the top. Paste the following in the text box, give the style a name, then click the Save button.
    #* You may need to adjust the margin values to get the Ctrl+D bookmark popup aligned properly on your system.
    <pre><nowiki>
    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    /* Title: Remove the bookmark star in Firefox 29+
    Author: http://forums.mozillazine.org/memberlist.php?mode=viewprofile&u=261941 */
    #bookmarks-menu-button > .toolbarbutton-menubutton-button {
    visibility: collapse !important;
    #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarker::before {
    display: none !important;
    #editBookmarkPanel {
    margin-top: 32px !important;
    -moz-margin-end: -34px !important;
    </nowiki></pre>
    If you don't want to install an add-on, you can use the ''userChrome.css'' file instead, but I don't recommend it.
    * http://kb.mozillazine.org/UserChrome.css

  • Why can't Firefox find the simplest sites and sites that I frequent?

    Why can't Firefox find ANY of the servers for the sites I frequent the most?
    Were you bought out by Google Chrome? This is beyond frustrating and ******* off your customers even if you are a free service is probably not a good business model.
    ''Edited by a moderator due to language. See the [http://support.mozilla.com/kb/Forum+and+chat+rules+and+guidelines Rules & Guidelines] .''

    http://kb.mozillazine.org/Error_loading_websites#IPv6
    To disable IPv6, change the preference network.dns.disableIPv6 from "false" to true . Here are the steps:
    Type '''about:config''' in the address bar, press Enter.
    Find network.dns.disableIPv6 in the list.
    Right-click -> Toggle.
    Restart your Mozilla application and try again.

  • HT4413 Why can't I find the files and data I transferred from time machine on my new mac?

    So I just got a new mac and I always backed up my old mac. I used the migration assistant to transferr all the stuff from my old mac to the new one. After it completed I tried  to find all my pictures, music, and documents but couldn't. Where did all my stuff go and why can't I find it? Migration Assistant said everything transferred and went ok.

    Peruse Pondini's Setup New Mac guide and seriously consider starting over. I'm a firm believer in only using the Setup Assistant and not creating a new account on first boot.

  • WHAT is "Hibernate this Group" and why can't I find ANY information on this and HOW to get accidentally hibernated groups BACK???

    This is REALLY getting me frustrated! What is "Hibernate this Group"? Why can't I find any information on it? Why can't I get groups back that have been accidentally "hibernated"? There is a "moon" symbol on my upper right screen that says "Hibernate this Group" and I don't know what it does or how it works! AND I accidentally "hibernated" a group when I clicked on it too long and a bunch of "zzz's" showed up and then it was GONE! How do I get it all back? And why isn't there a tech center I can contact to help with this???

    This sounds like some third-party app or extension, because this functionality is not in Firefox by default. [[Reset Firefox – easily fix most problems]] should remove it

  • Why can't Chrome find the webpage when Previewing in Browser?

    Hi -
    This is thoroughly bizarre to me.
    I can preview any site I'm working on using any browser I have except Chrome (current version 33.0.1750.152).
    As an example - when I use Preview in Browser - Chrome says "the webpage is not found" - the path to the page is:
    file://external-drive/_PROJECTS/CLIENT/_files-from-client/_SITE-031614/index.html
    My next step is to manually navigate to the page using Chrome's File/Open.  This works perfectly but when the page appears the path is different:
    file:///Volumes/external-drive/_PROJECTS/CLIENT/_files-from-client/_SITE-031614/index.html
    This second path is the same path in the Manage Sites/Site/Local Site Folder line.  All other browsers (FFox, Safari, Opera) use this second path.  But for some reason Chrome has shortened the path to an incorrect address.  Weird!
    I don't think this is related to Mavericks because it was happening before that upgrade.
    Has anyone else had this happen?  Can anyone explain how I can fix this?
    TIA your insight.
    JL2
    BTW - other details:
    Dreamweaver version 12 (CS6), Mac OS X 10.9.2.

    Stanko07 wrote:
    Hi jl200,
    I have the same problem since few weeks, and I am absolutely sure that jdaco answer isn't correct. All my files are on a desktop (iMac hard drive) all times and Dreamweaver has a problem with a preview in the Chrome browser. Few weeks ago everything was OK, so there isn't a problem with the files location. I think the problem has started after the last Dreamweaver update. Unfortunately I don't have any idea what to do to resolve this issue.
    You're right, the answer provided might be part of the problem but it's not the solution to the whole problem. My files are located on the computer too and Chrome will not preview them, sometimes, most of the time.
    I can't be asked to find out exactly why so I use Firefox or Safari.

Maybe you are looking for