PHP MYSQL and DW Question: Invalid characters and new lines entry/viewing

Hello all,
I have followed David Powers' two php/dw/mysql books and I've
set up PHP
pages that insert, edit, delete, etc. listings. Everything
works fine
except for invalid characters being inserted into the
database, and then
displaying with a question mark in firefox.
Is there a trick to cleaning up the data that a user may
paste into a
textbox on a web page for insertion in the database before
the data is
inserted or as it is inserted? Em dashes, en dashes, 'curly
quotes' etc.
are giving me problems.
Also, when I enter new lines into the php page while I'm
typing out
information for a record, these new lines are not being
displayed either
in the database (using phpmyadmin to view) or on the
resulting details
pages, even though I'm using nl2br, etc. Is there a way to
make this
work reliably?
Thank you for any help you may give me!
-John

Hello all,
I have followed David Powers' two php/dw/mysql books and I've
set up PHP
pages that insert, edit, delete, etc. listings. Everything
works fine
except for invalid characters being inserted into the
database, and then
displaying with a question mark in firefox.
Is there a trick to cleaning up the data that a user may
paste into a
textbox on a web page for insertion in the database before
the data is
inserted or as it is inserted? Em dashes, en dashes, 'curly
quotes' etc.
are giving me problems.
Also, when I enter new lines into the php page while I'm
typing out
information for a record, these new lines are not being
displayed either
in the database (using phpmyadmin to view) or on the
resulting details
pages, even though I'm using nl2br, etc. Is there a way to
make this
work reliably?
Thank you for any help you may give me!
-John

Similar Messages

  • Oracleasm listdisks is not listing all disk groups and returning "strange special characters" and disks groups are dismounting unexpected

    Hi everybody,
    I have a 3 node Oracle Cluster with verstion 11.2.0.3.0 installed using ASM/ACFS/ADVM.
    Red Hat 5.7 - Kernel 2.6.18-371.12.1.el5 64bits
    OracleASM version:
         oracleasm-support-2.1.8-1.el5
         oracleasm-2.6.18-371.12.1.el5-2.0.5-1.el5
         oracleasmlib-2.0.4-1.el5
    On may, 2014 we had a physical failure in our storage system and all our disk partitions were completely lost.
    The Oracle Grid Infrastructure and Oracle RDBMS haven't needed to be reinstalled because they were healthy.
    The Oracle Cluster Registry (OCR) was lost (it was composed by three ASM disk groups in a redundant structure) and after recreation of the OCR disk groups I recover the Oracle Registry information from backup.
    All cluster information were recovered (listener, SCAN, VIP, databases and services)
    Databases could not be started because all ASM disk groups have been lost and oracle ASM instance (asmcmd -p) was showing all disk groups, but they were all "empty" - the physical partition related with them were recreated.
    All the "old" disk groups were dropped, and the "new" disk groups were recreated and all the backups from the databases were restored.
    After all services were up, and the environment seems to be OK, I check the healthiness of it, by executing the oracle cluster post-installation tool and others verify tools (crsctl and srvctl), well all returning messages saying that the environment was completely OK and no errors were found or generated (including in many log files I have inspected)
    After 2 weeks from the completely recover of the environment, without any error/failure message been received from it, the disk groups started to dismount unexpectedly, from whatever node and not only one specific disk group stops, but any one of them, any time.
    I opened a SR in Metalink (Oracle Support) and they conduct me to upgrade RedHat kernel version and OracleASM version.
    Simultaneously I opened a Case Solution in RedHat to help me identify the better way to do the upgrade in advantage of the Oracle specifications.
    From:
    rpm -qa | grep kernel
    kernel-devel-2.6.18-274.el5
    kernel-headers-2.6.18-274.el5
    kernel-2.6.18-274.el5
    rpm -qa | grep oracleasm
    oracleasm-support-2.1.8-1.el5
    oracleasmlib-2.0.4-1.el5
    oracleasm-2.6.18-274.el5-2.0.5-1.el5
    To:
    rpm -qa | grep kernel
    kernel-devel-2.6.18-371.12.1.el5
    kernel-2.6.18-371.12.1.el5
    kernel-headers-2.6.18-371.12.1.el5
    rpm -qa | grep oracleasm
    oracleasm-support-2.1.8-1.el5
    oracleasm-2.6.18-371.12.1.el5-2.0.5-1.el5
    oracleasmlib-2.0.4-1.el5
    Well, after this upgrade less times the disk groups dismounted, but they continue dismounting from whatever node, any disk group, any time.
    So, I opened another SR in Metalink (3-10143566371 still open) and they are conducting me again to upgrade the RedHat kernel version and OracleASM version.
    Information about OracleASM:
    # oracleasm listdisks
    ACFS
    FRA
    OCR01
    OCR02
    OCR03
    $ asmcmd -p
    ASMCMD [+] > ls -l
    State    Type    Rebal  Name
    MOUNTED  EXTERN  N      ACFS/
    MOUNTED  EXTERN  N      ARCH/
    MOUNTED  EXTERN  N      DEV/
    MOUNTED  EXTERN  N      DIR_LOG/
    MOUNTED  EXTERN  N      JAVA_ARCHIVE/
    MOUNTED  EXTERN  N      MSAF/
    MOUNTED  NORMAL  N      OCR/
    MOUNTED  EXTERN  N      PRD_DATA/
    MOUNTED  EXTERN  N      PRD_REDO1/
    MOUNTED  EXTERN  N      PRD_REDO2/
    MOUNTED  EXTERN  N      PRD_REDO3/
    MOUNTED  EXTERN  N      PRD_REDO4/
    MOUNTED  EXTERN  N      RASTR/
    MOUNTED  EXTERN  N      STAGE/
    This is what happens when execute "oracleasm scandisks":
    # oracleasm scandisks
    Reloading disk partitions: done
    Cleaning any stale ASM disks...
    Scanning system for ASM disks...
    Instantiating disk "ùìÿÿÿÿÿÿÿÿÿÿÿìóæþÿ¥Ï¨®Ð¢"
    Unable to instantiate disk "ùìÿÿÿÿÿÿÿÿÿÿÿìóæþÿ¥Ï¨®Ð¢"
    Instantiating disk "ü´ñõ
                            ñõúìsö"
    Unable to instantiate disk "ü´ñõ
                                    ñõúìsö"
    ~±Ã1~u·}cÿ-Ûg disk "
    ¾s
    ~±Ã1~u·}cÿ-Ûinstantiate disk "
    ¾s
      Instantiating disk "à·Öªß³Ö½Þ®hìëÖßßÞÖÛÜØÖÕ"
    Unable to instantiate disk "à·Öªß³Ö½Þ®hìëÖßßÞÖÛÜØÖÕ"
    Instantiating disk "êËbkî,c
    ~,XZ±´b¹u²´biÅr"
    Unable to instantiate disk "êËbkî,c
    ~,XZ±´b¹u²´biÅr"
    Instantiating disk "
    PuTTYPuTTYUnable to instantiate disk "
    kÍ3|úùõ/øÊInstantiating disk "u
    i)ïìL"
    kÍ3|úùõ/øÊe to instantiate disk "u
    My question is: "This will really solve the problem?"
    Another: "Oracle really understood what is happening and they can help me to solve this problem?"
    Final: "Can anyone please help me this problem?"

    Hi,
    my two cent.
    Wait for the SR feedback.
    But for the future I advice you to do an ASM Metadata backup to be able to restore this data if you lost
    configurations or complete disks and so on.
    asmcmd md_backup -b <Pfad>/Filename
    and also an ocrconfig backup via crontab.
    ocrconfig -local -manualbackup
    regards

  • Why can't I access my credit union account anymore on my laptop? I enter username and password and it says invalid username and password!

    The trouble opening my credit union account just started yesterday and it was usable the day before.  I enter my username and password and the next window tries to open my account but ends up on a page that reads invalid username and password! What has happened to my settings? Can anyone relate or help me?

    My first approach would be to see if your credit union changed their web site.  If nothing has changed on your computer then it must be at their end.  If they say they have changed nothing then you can start looking at your computer settings.
    One small worrying item.  How did you come to try to log into them?  Never use a link in an unsolicited e-mail telling you to log in. Those often go to bogus sites trying to steal your identity that are almost perfect imitations of the real site, and will, of course, not actually log you into the real site.  I always check web addresses in my browser's status bar.

  • I need a Vietnamese keyboard. Recommendations? A keyboard that officially works with iPad and displays all the characters and their accent marks for typing.

    Where do I find an excellent and reliable Vietnamese keyboard for new iPad? A keyboard that displays all the characters and the accent marks so typing can be easily accomplished. The iPad keyboard selection for Vietnamese really only seems to change the Return key to the Vietnamese language. iPad is sold all over the world....my interest is Viet Nam.....the full keyboard.

    Thanks.....my Vietnamese expert spouse says this tip will work just fine.  I was not aware of the hold down function. Slow typing but accomplishes the objective native on the iPad.
    You are correct.....most Apps that I find seem to be based only on a copy/paste method of input.
    You solved the problem.

  • PHP/MySQL updates within OS X S and Security updates?

    Hey All,
    Does anyone know of a link that will provide any info about PHP, PHP plug-in, or MySQL updates that are included in the Server OS or security updates, or any other software updates? This way I won't have to read through all of Apple's support articles for all OS and security updates.
    Updating a bunch of web servers from OS X S 10.6.3 to OS X 10.6.6
    Thank you in advance!

    Great news thanks!

  • Invalid Characters '(' and ')' in Insert Statement

    I'm a sometime Oracle user having trouble inserting text containing ( and ) characters.
    Example:
    INSERT INTO _funds
                   (fund_id, fund_name, fund_desc)
         VALUES (11, 'British Opportunities', 'The fund''s aim is to maximise total return (the combination of income and growth of capital) from a portfolio investing primarily in UK equities.The rate of growth of funds cannot be guaranteed. This fund invests in the fund manager''s own collective investment fund of the same name.');
    Results in : [Err] ORA-00911: invalid character
    I've tried escaping with \ and wrapping in {} but just cannot get this to work. Should there be an issue with these characters. Could it be my client (Navicat)?
    Thanks.
    Alan
    (Server 9.2.0.1.0 on Windows)
    (Server 9.2.0.1.0)
    Edited by: user7578531 on Feb 27, 2009 1:16 PM
    Edited by: user7578531 on Feb 27, 2009 1:16 PM
    Edited by: user7578531 on Feb 27, 2009 1:17 PM

    Hi and welcome to the forum,
    Are you sure you have a table called _funds? that means you will have to doule quote it when referencing it.
    But, you insert statement works for me:
    SQL> create table "_funds"(fund_id number
                       ,fund_name varchar2(55)
                       ,fund_desc varchar2(2000))
    Table created.
    SQL> insert into "_funds"(fund_id
                       ,fund_name
                       ,fund_desc)
        values (11
               ,'British Opportunities'
               ,'The fund''s aim is to maximise total return (the combination of income and growth of capital) from a portfolio investing primarily in UK equities.The rate of growth of funds cannot be guaranteed. This fund invests in the fund manager''s own collective investment fund of the same name.')
    1 row created.P.S: code tag looks like {noformat}{noformat} put one before and after your (formatted) code.
    Regards
    Peter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • PHP/MySQL Record Insert question

    I am working with which PHP 4.4.2, MySQL Server 5.0 running
    on Apache 2.0.55, and I am developing my web-site with Dreamweaver
    8. All of which is running locally on my machine.
    I am working on a real-estate website that allows landlords
    around my local area to login to the web-site and add their
    apartment or housing rental units into a database that students
    that go to my small university can browse and search through. The
    landlords register through a form that loads into a 'landlords'
    table in the database and MySQL auto-increments an ID into a
    'landlord_id' column which obviously assigns them their
    'landlord_ID'.
    My question is: When the landlord is filling out the form to
    add one of their rental units ( which loads into a separate table I
    called 'sites'), how can I make their 'landlord_id' (which resides
    in the 'landlords' table) be entered into the 'landlord_id' column
    in the 'sites' table for each site that they enter into the
    database?
    I'm trying to do this because when the landlord first logs
    in, I'm going to have a dynamic table that displays all of the
    sites they already have entered in the database, and only displays
    their sites that they have already entered in by only displaying
    the sites that have their 'landlord_id' in the site record.
    Thanks so much for your help, and if I'm being confusing at
    all, please reply or email me so I can clarify.

    Cade06 wrote:
    > Thanks alot for your reply, but I am completely new to
    MySQL, and I am not
    > quite sure how the syntax works. When you say " WHERE
    landlord_username =
    > 'whatever' "I'm not sure what needs to go in the
    'whatever' portion of the
    > code. Do I need to insert static text here or something
    else? I am totally out
    > of my element here, sorry :-/
    It's probably not so much MySQL syntax that's the problem for
    you, but a
    lack of understanding how to work with Dreamweaver
    recordsets, server
    behaviors, and sessions. Building database-driven sites with
    Dreamweaver
    isn't difficult, but there are a lot of things involved.
    The Log In User server behavior automatically creates a
    session variable
    called $_SESSION['MM_Username']. You can use this as a
    parameter to pass
    to the SQL query in the Advanced Recordset dialog box. In the
    SQL area
    you would type (I'm guessing the name of your table and the
    username
    column):
    SELECT landlord_id FROM landlords
    WHERE landlord_username = 'col1'
    Then click the plus button above the Variables area, and
    create a
    Parameter with the following values:
    Name: col1
    Default value: 1
    Runtime value: $_SESSION['MM_Username']
    You can then extract the result of the recordset, and assign
    it to a
    session variable like this:
    $_SESSION['landlord_id'] = $row_recordsetName['landlord_id'];
    > Also, I understand that I need to do this on the login
    page, but do I need to
    > define the recordset again on the add_site page as well?
    I guess I'm still not
    > quite clear on how I specify the session variable as the
    value that needs to be
    > entered in the sites table as the landlord_ID.
    As long as the session is still valid (which it would be if
    you use
    Restrict Access to Page), you will always have access to that
    landlord's
    id through $_SESSION['landlord_id'].
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • I am trying to install MS Office for Apple, no to get the activation code for it you have to go through windows live , now I tried to sign in and been so long I forgot my password, so I tried to rest it the way they say to and keep getting invalid id and

    I am trying to install MS Office.man 2011 and when I get prompted to go get the activation code on line I have to log on with my windows live id. I had one when I had a pc and have since forgot my password so I enter my live id and goto the rest password screen, when I fill out the way they want I get an error message that says my live id is invalid, so I tried to start a new account and I use my email like they say and I get, that email already has a account and to try resting my password. anyone else have this issue?

    Since your question is related to Microsoft products, I suggest you post your question on their own forums for their Mac software:
    http://answers.microsoft.com/en-us/mac

  • Drag and drop questions using image and painting

    Hi all,
    please apologize me if i'm posting a just discussed topic, but I couldn't find anything that could help me.
    I'm trying to create an application where I've a Jtree on the left panel that contain entities that have to be dragged and dropped in the central panel (eventually pasting a representative image) as user decide.
    I've just implemented all panels and jtree. I read java tutorial on drag and drop, but I don't know HOW i can paste image as objects that then i can manipulate in such a way that the user needs.
    Do I have to use java.awt.dnd package?
    Please, I'd like to receive some suggestion about.
    Thanks in advance for your kindness.
    Vincenzo

    I'm sorry, I think that i've not been clear in my explanation. I don't know how to transfer by drag & drop an image (a node of a jtree) to a beside panel. I don't want to get code, it will be more appreciate suggestions on how to proceede.
    I don't understand if I need java.awt.dnd package. On java tutorial I read that it shouldn't have to be used.
    Thanks, I hope that I've been clearer now.

  • RS232 and LabView: It won't make new lines

    Hi everybody,
    I've got a microcontroller board here which sends some text over RS232. For example
    [quote='HTERM']
    UART'4': Key SW2 pressed<\r><\n>
    UART'4': Key SW2 pressed<\r><\n>
    UART'4': Key SW2 pressed<\r><\n>
    UART'4': Key SW2 pressed<\r><\n>
    UART'4': Key SW2 pressed<\r><\n>
    [/quote]
    In LabView I can see
    [quote='LabView']
    UART'4': Key SW2 pressed
    [/quote]
    I think I need some kind of buffer. I compared my VI to a LabView made hyperterminal. I filtered all the receiving thins out and optimized my own VI but it won't make several lines  like it has to make it.
    I attached my and the terminal (hyperterminal) VI. Maybe someone know why it won't work or rather where the differences are.
    Kind regards,
    Marc
    Attachments:
    Lesen_Und_Anzeigen.vi ‏8 KB
    Terminal.vi ‏82 KB

    I found a solution that works. But the main memory of my virtual winxp is too small to handle it (192MB). Hm after a restart (the program crashed) it works fine .
    [quote="LabView"]
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW2 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    UART'4': Key SW3 pressed
    Welcome to UART4 of the SK-FR-144PMC Evaluation-Board
    ================================================================
    After Reset => 7-Segm. LED-Display shows counter
    Key SW2, SW3 will change count direction
    UART'4' will be echoed
    UART'5' will be echoed
    UART'5' will be send to CAN with ID #3
    CAN ID #2 receive will be send to UART5
    Key SW2, SW3 will result in UART output
    ================================================================
    [/quote]
    Maybe someone would take a look
     By the way: How's my english? Every time I have the chance I try to get some response about it
    Thanks for helping me
    Best regards,
    Message Edited by BlackDevil on 03-02-2010 12:45 PM
    Attachments:
    Lesen_Und_Anzeigen.vi ‏12 KB

  • I run Windows 7 and the newest version (10.6) of iTunes will not install. The installer won't even begin, and when I run the Apple Software update, it tells me that iCloud and iTunes have invalid signature.

    When I run the Apple Software update, it tells me that iCloud and iTunes have invalid signature and will not be downloaded. When I DL iTunes64setup.exe, the program will not start (there's a bar that flashes but nothing actually begins). I've done everything short of reinstalling Windows to fix this (system resore, unistalling all Apple products, taking down firewall, running Windows FixIt - which either won't find the problem or gives me an error saying that the troubleshooter cannot be downloaded at this time, going into the security features to allow programs without valid signatures, trying to install earlier versions of iTunes). It all started when I downloaded the Decemberists new album on my iPhone, and it wasn't downloading it properly so I connected it to my Dell, but some songs still wouldn't DL - also, the newest OS for my iPhone still won't install via WiFi - and so I uninstalled iTunes first, but nothing is helping. And I don't have any security issues (Norton has checked). Any ideas? I'm at my wit's end after 3 days of this. Thank you.

    Ok, so after like 4 days of going through all these different issues, I figured out that several programs weren't downloading, and it was an issue with my wireless connectivity messing up the digital signatures, so if you plug in your comp to the modem and delete your temp files, it should start to work!

  • Question on SPAU and SPDD.

    Hi Everybody,
    I have gone through the links and the questions in SDN and ended up in some confusion...
    What objects will come in SPAU and SPDD?
    What happens to the modifications done in the older version when we upgrade the version? (with Modification assistant and w/o)
    Will they come in these transactions?
    And what if we apply some patches(Notes) to the system? What is the impact of these patches to the SPAU transaction?
    Please provide me the information..
    Thanks in advance...
    Rewards to the helpful answers...
    Sankar....
    Message was edited by:
            Sankar

    hi Sankar,
    Please find below, answers to your questions:
    I have gone through the links and the questions in SDN and ended up in some confusion...
    1.What objects will come in SPAU and SPDD?
    <i>Ans: All the objects which are modified, after tansporting to the current system,
    will be listed in SPAU and SPDD. SPDD contains the list of all modified Data Dictionary objects, like tables, dataelements, domains,view...etc. The rest of all the modified repository objects will be listed in SPAU. </i>
    What happens to the modifications done in the older version when we upgrade the version? (with Modification assistant and w/o)
    <i> Ans: After the initial upgrade happens, we have to do adjustments from SPAU/SPDD to maintain or reset the changes. That is, from the list of objects in SPAU/SPDD, you have to either carry forward the changes to the new version, by choosing the option <b>ADOPT CHANGES</b> (available on right click) or <b>RESET TO ORIGINAL</b> (available on right click)</i>.
    Will they come in these transactions?
    <i> Ans: yes, they will be listed in these transactions, after the BASIS updgrade activity. </i>
    And what if we apply some patches(Notes) to the system? What is the impact of these patches to the SPAU transaction?
    <i>Ans: Patches will be supported by the version upgrade. In case of notes, we have to verify whether these notes are supported by the new version (you can go into <u>http://www.service.sap.com/notes</u> to verify this. Also, we have to analyze whther the code in the note is already incorporated in the new version. In this case you can ignore the chanes choosing <b>RESET TO ORIGINAL</b> option</i>
    Hope this helps,
    Sajan Joseph.

  • Keep trying to install update for itunes and keep getting 'invalid signature'

    keep trying to install the new updates for itunes and keep getting 'invalid signature' and it won't download

    That suggests that the installer is getting damaged during the download.
    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • Eclipse and JBoss question ?

    hi,
    i know that it's not the place for this kinfd of question, i tried the JBoss forum, unfortynateley it's not very active, so....
    I have just installed a development environnement (Eclipse + Eclipse JBoss-IDE plugin, + JBoss 4.0 application server). everything is ok, i succeed creating a simple J2EE application (servlet + ejb session), but i have question about the following process
    generating file for the ejb session using xdoclet
    packaging the war file
    packaging  the jar file
    packaging the J2EE ear file
    deploying the applicationsuppose the folowing situation =>
    *I create a new EJB : so i have to generate the file (locale, home), repackaging the jar file and finally redeploy the ear file. is it the step i have to do ?
    *I want to modify an already deployed EJB, after code mofication, so i have to regenerate the file (locale, home), repackaging the jar file and finally redeploy the ear file. is it the step i have to do ?
    *And same question about jsp and servlet, have i to regeneare the war file and redeploy it ?
    and what about "hot deploying in JBoss".
    Thanks for your help

    generating file for the ejb session using xdoclet
    packaging the war file
    packaging the jar file
    packaging the J2EE ear file
    deploying the application:-)
    suppose the folowing situation =>
    *I create a new EJB : so i have to generate the file
    (locale, home), repackaging the jar file and finally
    redeploy the ear file. is it the step i have to do ?Package the EJB in a JAR and re-create the EAR with the new EJB jar in it. You might have to add some descriptors for the EAR.
    *I want to modify an already deployed EJB, after code
    mofication, so i have to regenerate the file (locale,
    home), repackaging the jar file and finally redeploy
    the ear file. is it the step i have to do ?Yes.
    *And same question about jsp and servlet, have i to
    regeneare the war file and redeploy it ?Yes.
    and what about "hot deploying in JBoss".Search on Google or read the documentation.

  • [php+mysql] best way to integrate a tree category menu base on db?

    Hi all,
    I have a products catalog where all products are organized in
    categories.
    The category structure is something similar to this:
    category 1
    subcategory 1.1
    sub-subcategory 1.1.1
    sub-subcategory 1.1.2
    sub-subcategory 1.1.3
    sub-subcategory 1.1.4
    sub-subcategory 1.1.5
    subcategory 1.2
    subcategory 1.3
    category 2
    subcategory 2.1
    subcategory 2.2
    sub-subcategory 2.2.1
    sub-subcategory 2.2.2
    sub-subcategory 2.2.3
    sub-subcategory 2.2.4
    subcategory 2.3
    ...and so on...
    In general, I have 3 category levels.
    I manage these catagories with only one table using self
    foreign keys.
    Now I need to add a tree menu that will reflect the above
    category
    structure.
    I use php + mysql to store the tables (products and
    categories.
    I found several javascript samples that allow you to do
    something similar
    but with static data.
    I'm searching for a tree menu that is easily customizable and
    that can use
    dynamic data from mysql db.
    Is there a tutorial or smple that would do the trick?
    TIA very much!
    tony ;).

    The page I'm trying to create is here www.hollisterairshow.com/plan-results.php and the questionnaire is here www.hollisterairshow.com/helpusplan.php .
    I went ahead and created recordsets using advanced recordsets and these seem to be working, here's a sample SQL
    SELECT *
    FROM plan
    WHERE Saturday = 'Saturday' AND plan.howArriving = 'Auto'
    I created a recordset for each combination of day and transportation mode - six in all
    This selected the correct records.
    To display the count of how many records selected I then used in DW Insert/Data Objects/ Display Record Count/Total Records which generated the following code:
    <?php echo $totalRows_rsSatAuto ?>
    This worked OK - not elegant but OK and I repeated it for each combination of Day and Transportation mode!!
    So there are two problems I'm having:
    I know I can select the records I want but how do I display the sum of the column containing "How many in your party" - i.e. in the PHP code generated above what do I replace $totalRows_rsSatAuto with?
    There are two questions using radio buttons where I'd like to display the count and % for each option selected. I can select all records for these questions but what code do I put to sum the number of selections for each option and what code do I put to calculate the percentage
    I understand the arithmetic involved which is pretty simple but it's the mechanics of coding that has me stumped. It would really help if you could give me a sample for say the "Are you camping overnight" question which has a "Yes/No" option only. In my mundane way I would create two recordsets, one for "Yes" and one for "No", and use the same technique I describe above for counting Total Records in each recordset, but then I'm stuck with how do I calculate and display the percentages. I must be missing something very obvious as I'm sure there just has to be a more elegant solution.
    Thanks so much for your continued interest.
    Tony

Maybe you are looking for

  • BOBJ XI 3.1 SP7 SSO logout and login again not working

    Hello, The customer have a deployment of five BOBJ XI 3.1 SP7 with Tomcat 7 servers and AD integration with SSO. The case is that: The SSO login works fine on all servers, but when click logout and then go to the address bar and hit enter on the firs

  • Print preview report running error in client workstation

    dear all, I face an issue in  preview report in client, The report is write in store procedure, using crystal report for the designer. I use OLEDB SQL native clilent. My report is running well in server the server os is windows server 2003 , SQL serv

  • Hide Print Button on Printout.

    Hi Everyone, I am using print button on Dashboard. but when we click on print button what I want is. printout should show print button. Can we achieve this?

  • How can I execute a Procedure with OUT variable is %ROWTYPE on SQL Prompt

    Hi, I have a procedure with OUT variable is %ROWTYPE How can I execute the following procedure on SQL prompt. (without creating anonymous block) CREATE OR REPLACE PROCEDURE zz_sp_EMP(VEMPNO IN EMP.EMPNO%TYPE, V_REC IN OUT EMP%ROWTYPE) AS BEGIN SELECT

  • Show Message Before Send?

    Hi All, I think this is my last question (At least I hope so)... I am using the Groupwise objects to generate an EMail from my application which works fine, however I would like to show the EMail to the user before it is sent. So I programmatically c