Dreamweaver list/menu in Contribute

Hello,
In dreamweaver I have made a form for people to make a
reservation for a boattrip. In this form you can choose from a
list/menu to select a specific date for your trip.
Before, I always updated these dates in Dreamweaver myself.
But now I'd like the bookingsoffice to do it themselves. Is this
possible in Contribute? And if so... how?
Thanks a lot for your support!

The library items are not editable in Contribute. Regarding menu items if it is a SPRY menu, then it is configurable in Contribute CS5.

Similar Messages

  • PHP/Dreamweaver dynamic list menu

    I have a mySQL DB that has address listings on it, I have
    used the city column to populate a list menu dynamically w/ PHP...
    No problems so far- but I cannot figure out how to have each city
    listed only one time.
    In other words, say I have 20 of the same city listed on the
    DB column. I want each city to be listed once in the list menu....
    Any idea??? I have been thinking about it all day w/ out any
    luck!
    Thanks in advance,
    -B

    .oO(Steve)
    >On Wed, 7 Feb 2007 03:16:54 +0000 (UTC), "za beezo"
    ><[email protected]> wrote:
    >
    >> In other words, say I have 20 of the same city
    listed on the DB column. I want
    >>each city to be listed once in the list menu....
    >
    >SELECT DISTINCT instead of just SELECT
    Or a GROUP BY clause, which is what I usually prefer. But in
    this case
    it shouldn't matter.
    Micha

  • Dreamweaver template not updating Contribute pages

    Currently I'm trialing Dreamweaver (MX) and Contribute
    (3.11), to check
    that it's a workable solution for my company, in terms of
    editing and
    auditing, but right now I'm having a problem.
    I have some templates (.dwt files) that I create in
    Dreamweaver, for
    use with Contribute, i.e. I create the template, other people
    create
    the content for our site based on the those templates.
    The issue is that when I make a change to the template, I
    would expect
    the pages created in Contribute to be refreshed to use the
    new
    template, but that doesn't appear to be happening. The only
    way I can
    get the page to be updated is to edit the page in Contribute,
    go to the
    Format menu and choose 'Template Properties', then hit OK
    again to
    close this dialog. I then see the page refresh with the new
    template
    changes.
    Am I doing something wrong? I would expect, as I mentioned,
    to have all
    pages automatically updated when the template is saved, and
    published.
    Is there a setting I need to turn on, or a procedure of
    publishing the
    template that I need to adhere to?
    any advice would be appreciated.

    Thanks for the reply Mark. While I think I've found most of
    the things you mentioned since my first post, it is useful to get
    confirmation of my finding, which appears to be consistent with
    your post.
    Here's what I've found, and later, why I'm not really liking
    it:
    If I edit the .dwt file in Dreamweaver and try to save it, I'm
    prompted to only update those files I have locally that reference
    the template.
    I can only update those local files that are checked out,
    though the saving process will check them out automatically
    If I create a new page using Contribute, I must refresh the
    templates first
    My concerns are:
    if I can only update those files I have locally, then do I need
    to have the whole remote site stored locally too? My company site
    is huge (as it's translated into 6 languages) and has multiple
    contributors/editors. It sounds like I will have to download the
    entire site before I edit a template, and put it back again
    afterwards. Is that right?? it sounds rediculous, so I'm sure I've
    got it wrong.
    if I have the files locally, I must check them out before or
    while saving the template. However, I then have to check them back
    in manually. Again, with potentially 300 to 400 pages per template,
    that's a lot of manual checking-in. If the saving process can
    automatically check pages out, can it also automatically check them
    in again??
    Like you, Mark, I find it strange that Contribute requires a
    manual refreshing of templates. I've searched all the options I can
    find, but I don't see an auto-refresh templates setting, which
    would be sooo useful. As it stands I will have to instruct each
    editor/contributor to refresh before they create a new page, and
    pray that they do.
    any further advice from Contribute/Dreamweaver users would be
    greatly appreciated. How do users with very large website handle
    this? Are there any tricks or hints that you can pass on?

  • Dynamic list/menu update page

    Hi,
    I am using PHP, Mysql.  MySQL has different tables.  Created list/menu to show data off one of the table that works great and when I select the value and hit the updae button it updates the database correctly.  Problem I am having is that when I go to update the page again, it always defaults to the first value of the drop down list.    I need it to remember the value that was selected.  Hope this explains it well.

    Hi,
    So the first example I am posting is pretty much the same idea as what Gunter wrote, Gunter wrote the way to handle it in dreamweaver.
    This example is what happens in the code after the DW wizard does its thing.
    Right before it submits to the database you can create a session of the value.
    $_SESSION['cat_id'] = $_POST['cat_id'];
    Then use a string compare command to check against the session.
    (If session cat_id is the same as the recordset cat_id value then echo that line as selected)
    <?php if (!(strcmp($row_listCategories['id'], $_SESSION['cat_id']))) {echo "selected=\"selected\"";} ?>
    Here it is included in your code sample:
    <select name="cat_id" multiple="multiple" size="5" id="cat_id">
              <?php do { ?>
              <option value="<?php echo $row_listCategories['id']?>"<?php if (!(strcmp($row_listCategories['id'], $_SESSION['cat_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_listCategories['cat']?></option>
              <?php
                    } while ($row_listCategories = mysql_fetch_assoc($listCategories));
                      $rows = mysql_num_rows($listCategories);
                      if($rows > 0) {
                          mysql_data_seek($listCategories, 0);
                          $row_listCategories = mysql_fetch_assoc($listCategories);
                ?>
            </select>
    Note that at the top of your page you will need to initiate the session:
    session_start();
    NOTE: This is example takes note that you added the multiple="multiple" tag to your select. If you want it so someone selects two items then after the update you want to call on both select items. (so all they selected is still selected, not just the last item.).
        <select name="select[]" id="select" multiple="multiple">
          <?php do { ?>
          <?php if (is_array($_SESSION['cat_id'])) { ?>
          <option value="<?php echo $row_listCategories['id']?>"<?php if (in_array($row_listCategories['id'], $_SESSION['cat_id'])) {echo "selected=\"selected\"";} ?>><?php echo $row_listCategories['cat']?></option>     
          <?php } else { ?>
          <option value="<?php echo $row_listCategories['id']?>"<?php if (!(strcmp($row_listCategories['id'], $_SESSION['cat_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_listCategories['cat']?></option>
          <?php } ?>     
              <?php
                    } while ($row_listCategories = mysql_fetch_assoc($listCategories));
                      $rows = mysql_num_rows($listCategories);
                      if($rows > 0) {
                          mysql_data_seek($listCategories, 0);
                          $row_listCategories = mysql_fetch_assoc($listCategories);
                ?>
        </select>
    You will probably have to make an adjustment to your database input query to handle the array $_POST['cat_id']. I didnt have time to test that part.

  • List/Menu a required field

    Is there a way to make a list/menu field in a form required
    by the user to select an item from its list? I know how to do it
    for a text field but not for a list menu.
    Thanks,
    Dave

    Download the Check Form extension from www.yaromat.com as it
    has an option
    to force the person to select from a drop down and exclude
    the first item.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Dave Blake" <[email protected]> wrote in
    message
    news:esk17i$1aj$[email protected]..
    > Is there a way to make a list/menu field in a form
    required by the user to
    > select an item from its list? I know how to do it for a
    text field but
    > not for a list menu.
    >
    > Thanks,
    > Dave

  • Dynamic Form list/menu

    I'm trying to insert a dynamicly generated form list/menu dropdown item.
    Everything works but the list always shows me the last record from the database as the first item in the list (ASC or DESC).
    I want to put a dummy label as the first item in the list like: Select from list
    How can i do this, because even if i put a static value in the value list items, it still shows the last item from the recordset first instead of the static value.
    Does anybody have an idea how i can create a dynamic pulldown list in my form with the first item listed to be a statich dummy tekst or label like "Select from list etc"
    Thanks,

    I created a normal recordset with Dreamweaver getting tea
    m_id and team_names out of the database. Then i list the teamnames in a form list/
    menu (dropdown) to show all the available teams. Again it shows me the last record from the
    recordset as the first list item and i want a standard "select this" text or something default.
    The form code below is generated by dreamweaver itself. I already tried to also put one static value in the value list property but i get the same result. To me it looks like the while loop is overriding whatever you put as static text.
    <form id="form1" name="form1" method="post" action="">
      <label for="list_teams">Teams:</label>
      <select name="list_teams" id="list_teams">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_Teams['team_id']?>"<?php if (!(strcmp($row_Teams['team_id'], $row_Teams['team_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Teams['team_name']?></option>
        <?php
    } while ($row_Teams = mysql_fetch_assoc($Teams));
      $rows = mysql_num_rows($Teams);
      if($rows > 0) {
          mysql_data_seek($Teams, 0);
       $row_Teams = mysql_fetch_assoc($Teams);
    ?>
      </select>
    </form>

  • Dynamic List/Menu After Update

    Hi All,
    Dreamweaver - ASP
    I have a form to add records. The first field is a dynamic list/menu to select the date.
    After the Add record button is pressed the page reopens but the date menu has reverted to "Select date"
    Is there a way to retain the previously chosen date when the page refreshes?
    Many thanks
    John

    Hi All,
    Solved the problem.
    I set  up a session variable for the date and then used the 'Dynamic' button for the List/Manu, Select Value equal to,  and selected the session variable.
    Regards
    John

  • Dynamic List/Menu with 2 columns

    I have created a Dynamic List/Menu box based on a recordset and showing me one field of that recordset ['Firmanaam'].
    <?php
    do { 
    ?>
                <option value="<?php echo $row_klantenselectie['Firmanaam']?>"><?php echo $row_klantenselectie['Firmanaam']?></option>
                <?php
    } while ($row_klantenselectie = mysql_fetch_assoc($klantenselectie));
      $rows = mysql_num_rows($klantenselectie);
      if($rows > 0) {
          mysql_data_seek($klantenselectie, 0);
       $row_klantenselectie = mysql_fetch_assoc($klantenselectie);
    ?>
    First question what is the difference between 'values" and 'labels' in the creation box of the Dynamic List/menu as only the field entered in the 'labels" is shown in the listbox ?
    Secondly I want to display two columns in the List box (one column with the client ID and one column with the clients name). How do I proceed ? Afterwards clicking on the selected client should send the client ID to another field in the form.
    Thank you for your replies.

    Moved to the Develop server-side applications in Dreamweaver forum, which deals with this sort of issue.
    First question:
    The Values field in the Dynamic List/menu dialog box populates the value attribute in the opening <option> tag. Because it's an HTML attribute, it's not displayed when the page is rendered in a browser. The Labels field puts the text that will be displayed in the drop-down menu between the opening and closing <option> tags.
    Put the value you want displayed in the Labels field, and the value you want sent to the server when the form is submitted in the Values field.
    Second question:
    Normally, you would put the ID in the Values field, and the name in the Labels field.
    Because the value attribute will contain the ID, it shouldn't normally be necessary to populate another field with the selected value because the ID will be sent to the server with the rest of the form data when the form is submitted.

  • Populate List/Menu in Update Record form

    I am creating an update record form that contains a list/menu
    (with values General, 2002, 2004, 2006)
    How do I populate this menu so that it pulls current value
    from database, and not just the top default value each time?

    Swn-Y-Mor wrote:
    > I am creating an update record form that contains a
    list/menu (with values
    > General, 2002, 2004, 2006)
    >
    > How do I populate this menu so that it pulls current
    value from database, and
    > not just the top default value each time?
    Select the menu object in the form. Then click the Dynamic
    button in the
    Property Inspector. In the dialog box that opens, click the
    lightning
    bolt next to Select value equal to. Finally, choose the data
    field from
    the correct recordset.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • How do I set up Dreamweaver 5 menu in English?

    How do I set up Dreamweaver 5 menu in English?
    I live in Japan but my computer set up (Mac OSX 10.9.4) is English as a primary
    language then Japanese secondary.
    When I downloaded Dreamweaver 5, it was automatically downloaded
    as a Japanese version.

    If you want to change the dictionary in DW, go to Edit > Preferences (see screenshot).
    This won't change your Japanese version of DW to English version. For that, you need to uninstall and re-install the English language version.
    Downloads of older Creative Suite Products
    http://helpx.adobe.com/download-install.html
    Nancy O.

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • How do I make my form (list/menu) items open in the same window (self).

    Hello, the kind, brilliant people on this forum have always been able to help me in the past, so I thought I'd give it a try today. Items in a form (list/menu) that I've created are opening in a blank window (pop-up) when clicked. I would like them to open in "self" mode so that pop up blockers on various computers don't become a challenge for site visitors. Can anyone please tell me how I could make that adjustment? I selected the entire form "red dotted line" around the list and changed the "target" in the properties menu to "self". Then I selected everything on the page and still not correct. I am inserting the code below. Any assistance to get me on the right track would be GREATLY appreciated!! BTW I also made the form a library item (just in case that fact is needed). Also if you need to see the actual link it is http://www.graphicmechanic.com/DEKALBCOUNTY/index.html. The "I WANT TO" list is the part I'm referring to.
    CODE BELOW:
    <form action="" method="post" name="form1" target="_self" class="style26" id="form1">
                       <a href="#" target="_self"><span class="style26">
                       <label FOR="iwantto">I WANT TO:</label>
                       <br />
                        <img src="../images/5x5.gif" alt="layout graphic" width="5" height="5" /><br />
                        <select name="iwantto" id="iwantto" class="style55" onchange="MM_jumpMenu('window.open()',this,0)">
                          <option value="http://web.co.dekalb.ga.us/voter/#">REGISTER TO VOTE</option>
                          <option value="https://govaffiliate.ezgov.com/ezutility/index.jsp?agency=3411">PAY MY WATER BILL</option>
                          <option value="../humanserv/hs-osa-facilities.html">FIND A SENIOR CENTER</option>
                          <option value="../humanserv/hs-lou-walker.html">GET INFO ABOUT LOU WALKER CENTER</option>
                          <option value="http://www.dekalbstatecourt.net/">FILE A RESTRAINING ORDER</option>
                          <option value="http://www.dekalbcountyanimalservices.com/">REPORT A LOOSE DOG</option>
                          <option value="http://web.co.dekalb.ga.us/courts/recorders/payment.asp">GET TRAFFIC CITATION INFO</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/pistol.htm">APPLY FOR A PISTOL LICENSE</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/marriage.htm">GET A MARRIAGE LICENSE</option>
                          <option value="http://www.co.dekalb.ga.us/dekalbflic/Centers.htm#service">FILE FOR A DIVORCE</option>
                          <option value="http://www.co.dekalb.ga.us/superior/index.htm">GET INFORMATION ABOUT JURY DUTY</option>
                          <option value="http://web.co.dekalb.ga.us/taxcommissioner/search.asp">PAY MY TAXES</option>
                        </select>
                       </span>
                       </a>
    </form>

    Looks like it still isn't working. When I removed those items the drop down menu stopped working as well. I went ahead and posted yours as the correct answer. I'm convinced it's my skill level. i'm gonna do some javascript searches to see where the js code should go, it's very confusing to me. Here is that code in case anything sticks out to you or anyone else.
    <link href="../cssfiles/lbistyles.css" rel="stylesheet" type="text/css"/>
    <form action="" method="" name="form1" class="style26" id="form1">
                     <span class="style26">
                       <label FOR="iwantto">I WANT TO:</label>
                       <br />
                        <img src="../images/5x5.gif" alt="layout graphic" width="5" height="5" /><br />
                        <select name="iwantto" id="iwantto" class="style55">
                        <option value="#" onClick="MM_goToURL('self','http://web.co.dekalb.ga.us/voter');return document.MM_returnValue">REGISTER TO VOTE</option>
                          <option value="https://govaffiliate.ezgov.com/ezutility/index.jsp?agency=3411">PAY MY WATER BILL</option>
                          <option value="../humanserv/hs-osa-facilities.html">FIND A SENIOR CENTER</option>
                          <option value="../humanserv/hs-lou-walker.html">GET INFO ABOUT LOU WALKER CENTER</option>
                          <option value="http://www.dekalbstatecourt.net/">FILE A RESTRAINING ORDER</option>
                          <option value="http://www.dekalbcountyanimalservices.com/">REPORT A LOOSE DOG</option>
                          <option value="http://web.co.dekalb.ga.us/courts/recorders/payment.asp">GET TRAFFIC CITATION INFO</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/pistol.htm">APPLY FOR A PISTOL LICENSE</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/marriage.htm">GET A MARRIAGE LICENSE</option>
                          <option value="http://www.co.dekalb.ga.us/dekalbflic/Centers.htm#service">FILE FOR A DIVORCE</option>
                          <option value="http://www.co.dekalb.ga.us/superior/index.htm">GET INFORMATION ABOUT JURY DUTY</option>
                          <option value="http://web.co.dekalb.ga.us/taxcommissioner/search.asp">PAY MY TAXES</option>
                        </select>
                       </span>
                       </a>
    </form>

  • Switch List Menu in G/L & Vendor Line Item Display

    Hi Dear All Experts,
    I've 2 problems.
    The first one is in the Vendor line item display program.
    copied RFITEMAP and create custom program and then I create new structure (like FAGLPOSX) to show extra fields. (eg. Vendor, User)
    New extra fields are shown when i execute but if I click switch menu from the setting menu, it is shown by the old fields not including new fields.
    The second one is in the GL Line Item display program.
    Even the Switch List menu is enable in the Vendor Line Item display custom program without changing anything for gui status, the switch list menu in my new custom program is disable.(copied from fagl_account_items_gl).
    Thks all in advance..
    TRA

    the second question is now solved.
    Include ZFAGL_ACCOUNT_ITEMS_DEF (C_REPID_GL     LIKE SY-REPID  VALUE  'FAGL_ACCOUNT_ITEMS_GL') I put custom program name in this field.
    When I changed to std program name, the switch list menu is enable..
    Only the first question is left..
    Please let me know is there any way to solve...
    Best Regards
    TRA

  • How to change a list/menu to a text field when 'Other' is chosen?

    Hi there. I've been trying to solve this for a week now and I have depleted all my resources, that is why I'm here. I even went to jquery but nothing works and I think I was over-complicating this way too much.
    In short: I have a contact form, which have a list/menu with validation, and one of the options of that list/menu is "other". What I want is that when the user select "other" automatically change to a text field in order to let the user put his custom color. This is what I have:
    <form method="post" action="process.php">
    <span id="spryselect1">
    <label for="colors"></label>
    <select name="colors" id="colors">
    <option selected="option1">Blue.</option>
    <option value="option2">White</option>
    <option value="option3">Red</option>
    <option value="other">other</option>
    </select>
    <span class="selectRequiredMsg">Please select a colour.</span></span>
    <input type="submit" value="Send">
    </form>
    I know now that the approach is to show/hide a separate textbox besides the other... well. I don't know how to implement that, I think I really need your help guys. I'm completely frustrated.
    Thanks in advance.

    Have a look at the following
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="http://labs.adobe.com/technologies/spry/widgets/selectvalidation/SpryValidationSelect.css" rel="stylesheet">
    <link href="http://labs.adobe.com/technologies/spry/widgets/textfieldvalidation/SpryValidationTextField.css" rel="stylesheet">
    <style>
    .hidden {display:none;}
    </style>
    </head>
    <body>
    <form action="" method="post">
      <span id="spryselect1">
      <label for="colors">Colours:</label>
      <select name="colors" id="colors" onchange="MyOnClickHandler(this.value)">
        <option value="">Please select...</option>
        <option value="blue">Blue</option>
        <option value="white">White</option>
        <option value="red">Red</option>
        <option value="other">other</option>
      </select>
      <span class="selectRequiredMsg">Please select a colour.</span></span><span id="sprytextfield1">
      <input name="other" id="other" class="hidden" type="text">
      <span class="textfieldRequiredMsg">A value is required.</span></span>
      <input name="" type="submit">
    </form>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryDOMUtils.js"></script>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryValidationSelect.js"></script>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryValidationTextField.js"></script>
    <script>
    var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
    var sprytextfield1;
    function MyOnClickHandler(value) {
         if(value =='other') { //show text field and set validation
              if(!sprytextfield1){
              sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
              Spry.$$('input#other').removeClassName('hidden');
         } else { //hide textfield and destroy validation
              if(sprytextfield1 && sprytextfield1.destroy){
                   sprytextfield1.resetClasses();
                   sprytextfield1.destroy();
                   sprytextfield1 = null;
              Spry.$$('input#other').addClassName('hidden');
         return false;
    </script>
    </body>
    </html>
    Gramps

  • List/Menu (multiple selected)  insert into MySQL

    I have been building a feedback form and I am running into a
    issue that when I place a list/menu that allows multiple selections
    when I submit my form in my MySQL database it collected the
    information but only on the last multiple selection.
    For example, this is what my list/menu looks like.
    <select name="occasion" size="5" multiple="MULTIPLE"
    id="occasion">
    <option value="Spur of the moment,">Spur of the
    moment</option>
    <option value="Family dinner">Family
    dinner</option>
    <option value="Special occasion (i.e.
    birthday)">Special occasion (i.e. birthday)</option>
    <option value="Office get together">Office get
    together</option>
    <option value="Romantic dinner">Romantic
    dinner</option>
    <option value="Night out with friends">Night out with
    friends</option>
    <option value="Business meeting">Business
    meeting</option>
    <option value="Other">Other</option>
    </select>
    And my MySQL database I have it set up as...
    Field Type
    occasion mediumtext
    I do not know why I cannot have more than one selection
    inputed into my field, what must I do to correct this? Everything
    works perfectly expect the multi selected list/menu. I want to
    place all that is selected in the list/menu in that one database
    field called occasion.

    .oO(MikeL7)
    >>You should also test with isset() and is_array() if
    $_POST['occasion']
    >>is available at all and of the expected type. The
    code above will also
    >>throw a notice if $insert_string is not initialized
    before the loop.
    >
    > I use both isset and is_array in my code, When you say
    notice, you dont mean
    >a script stoppiong error?
    Nope. An E_NOTICE error won't terminate the script, but
    shouldn't happen
    nevertheless. While developing, the error_reporting directive
    should be
    set to E_ALL|E_STRICT and _all_ reported problems should be
    solved. It's
    not only better coding style, but also helps to prevent real
    errors. In
    this particular case it was just a guess, because it was only
    a part of
    the code. But using an uninitialized variable with a '.='
    operator for
    example would lead to a notice, which should be fixed.
    >>But of course this is a really bad DB design, as it
    already violates the
    >> first normal form (1NF). Just some ideas for queries
    that might come to
    >> mind, but would be really hard to do with such a
    comma-separated list:
    >
    > A better table design would be to have column for |
    list_ID | user_ID |
    >song_ID | and do a insert for each song selected.
    Yes, something like that.
    >Thanks for the input, i like escaping the variables from
    a string as they
    >stand out more in code view, is the single quote method
    faster? And which one
    >will be or is already deprecated?
    All are correct and won't be deprecated. IMHO it's more or
    less just
    personal preference. It also depends on the used editor and
    its syntax
    highlighting capabilities. For example I use Eclipse/PDT for
    all my PHP
    scripts, which can also highlight variables inside a string.
    But if the
    above is your preferred way, there's nothing really wrong
    with it.
    Just some additional thoughts:
    Personally I prefer as less escaping and concatenating as
    possible,
    because such a mixture of single quotes, double quotes, dots
    and
    sometimes even escaped quote signs (for example when printing
    HTML)
    _really_ confuses me. I like to keep my code clean and
    readable.
    Something like this:
    print "<img src=\"".$someVar."\" ...>\n";
    not only hurts my eye, it is also quite error-prone. It's
    easy to miss a
    quote or a backslash and get a parse error back, especially
    in editors
    with limited syntax highlighting (or none at all). So I would
    prefer
    print "<img src='$someVar' ...>\n";
    or even
    printf("<img src='%s' ...>\n", $someVar);
    When it comes to performance issues, of course there's a
    difference
    between the various methods. But for me they don't really
    matter. In
    practice you usually won't notice any difference between an
    echo, a
    print or a printf() call for example, as long as you don't
    call them
    a million times in a loop.
    So I always just use the method that leads to the most
    readable code.
    In many cases, especially when a lot of variables or
    expressions are
    involved, (s)printf() wins. Not for performance, but for
    readability.
    But as said - personal preference. YMMV.
    Micha

Maybe you are looking for