Reset list menu HELP

Using MX '04 - created a list/menu - with default entry
showing title of options available upon opening browser. After user
selects item - clicks back to original index page, it display last
selection. I want the menu to reset to title of drop down options.
I am thinking List Values???

> <form id="quote" name="quote" method="post"
action="">
In the action you'll need to call a script that in turn sends
the email
to the emails specified.
In the script you have to assign the emails desired as the
recipients.
in PHP it looks something like this (of course very
simplified)
in your form:
<form id="quote" name="quote" method="post"
action="processform.php">
<select name="ddlSalesRep"
id="ddlSalesRep" style="width:248px;">
<option value="Select a Sales Rep."
selected="selected">Select a
Sales
Rep.</option>
<option value="[email protected] ">Dan
T</option>
<option
value="[email protected]">Michel</option>
</select>
in processform.php
<?php
if ($_POST['ddlSalesRep'] != 'Select a Sales Rep.')
{ $recipient = $_POST['ddlSalesRep']; }
else
{ // default value
$recipient = [email protected];
// get other vars from POST
// define other
$subject = 'Mysubject';
$body = ... collection of all vars
//send
mail($recipient,$subject,$body);

Similar Messages

  • List/Menu Help

    Hello Everyone
    I am trying to create a webpage that has a List/Menu type
    dropdown and what
    I want it to do is that when I select an item in the drop
    down I want it to
    play a specific SWF file right below the drop down. Is this
    possible and if
    it is can someone supply me with an example.
    Thanks in advance
    Roberto

    Your best bet if you are using flash is to combine a flash
    dropdown menu with the flash movies. It then should be a fairly
    easy to process to script the flash movie to change and play based
    on the dropdown selection.
    Hope this helps
    Paul

  • Please help! How can I validate Radio Buttons and List Menu with PHP.

    Hello everyone, I have been learning PHP step by step and
    making little projects.
    The point is I find it easy to learn by doing "practical
    projects."
    I have been reading the David Powers's Book on PHP Solutions
    and it's really great, however there is nothing mentioned regarding
    Validating Radio buttons. I know the book cannot cover every aspect
    of PHP and maybe someone in here can help.
    I have been learning how to process HTML forms with PHP.
    The problem is every book or tutorial I have read or
    encountered fall short on validation.
    I'm wondering how I can learn to validate Radio Buttons and
    Select List Menu.
    I have managed to create validation for all other fields but
    have no clue as to how I can get validation for Radio Buttons and
    List Menu.
    I would also like an error message echoed when the user does
    not click a button or make a selection and try to submit the form.
    I would appreciate any help.
    Patrick

    It's not that default value is "None." In fact it's not. It
    will only be
    "none" when the form is submitted.
    Also if your submit button is names 'send' then
    $_POST['send'] will only be
    set if the form was submitted.
    Make sure you didn't hit the refresh button on your browser
    which usually
    reposts the information. Also make sure you did not reach the
    form from
    another form with the same button names.
    Otherwise paste the snippet.
    Also you can check what fields are set in the post array by
    adding this to
    the top of (or anywhere on) your page:
    print_r($_POST);
    Cosmo
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Off the top of my head this should be no different than
    your radio buttons
    > except that 'productSelection' will always fail the
    !isset check when the
    > form is submitted since the default value is "None", and
    therefore always
    > set. :-)
    >
    > So how about this..?
    > <?php
    > if (isset($_POST['send']) and
    ($_POST['productSelection'] == "None"))
    > {echo "Please select a product.";}
    > ?>
    >
    >
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > > Another question - how do i applied the code you
    just showed me to
    > > select
    > > menu
    > > or select list?
    > >
    > > This is the list:
    > >
    > > <div class="problemProduct">
    > > <label for="productSelection"><span
    class="product_label">Product
    > > Name.</span></label>
    > > <select name="productSelection" id="products"
    class="selection">
    > > <option value="None">-------------Select a
    product----------</option>
    > > <option value="Everex DVD Burner">Everex DVD
    Burner</option>
    > > <option value="Vidia DVD Burner">Vidia DVD
    Burner</option>
    > > <option value="Excerion Super Drive">Excerion
    Super Drive</option>
    > > <option value="Maxille Optical Multi
    Burner">Maxille Optical Multi
    > > Burner</option>
    > > <option value="Pavilion HD Drives">Pavilion
    HD Drives</option>
    > > </select>
    > > </div>
    > >
    > > I thought I could just change the name is the code
    from operatingSystem
    > > to
    > > productSelection.
    > >
    > > Something like this:
    > >
    > > From this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['operatingSystem']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > To this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['productSelection']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > But this does not work, any ideas?
    > >
    > > Patrick
    > >
    >
    >
    >
    >
    > Hey, I tried this about but as you mentioned, since the
    default product
    > value
    > is "None" an error message appears when the page loads.
    >
    > Is there a way to code this things so that even though
    the default value
    > is
    > "None" there ia no error message untle you hit the
    submit?
    >
    > When I applied the code, it messes up the previous code,
    now the operating
    > system is requiring an entry on page load.
    >
    > When I remove the code from the list menu everything
    goes back to normal.
    >
    > I know this is a little much but I have no other
    alternatives.
    >
    > Patrick
    >

  • My ipod reset the menu can anyone help me

    i went to a friends house and before i went my ipod battery waz very low and wen i waz out my dad charged it for me (so wen i got back it would be fully charged and i could use it)but wen i got back i turned my ipod on and all the settings had been reset..???? all of my songs were still there but the menu waz completly reset i think its just because the battery ran flat before he charged it therefore causing it to reset the menu but i waz wondering if theres any other cause and if it damaged the ipod and is it a problem..??? can anyone help me with this
    thanx

    so does updating it improve its battery life or
    restoring it because im getting rubish battery time
    from my nano!
    I assume you know that the backlight kills your battery and that the quoted battery life is for operation under perfect conditions. I just posted this in another thread and I'm reposting it here for you....
    Specially about the battery, it lasts very little of
    I expected. (About 4-6 hours, ligh off, equalizer
    rock, moderate volume).
    Is it actually running out, or are you going by the meter? The vast majority of people who have this problem aren't actually running out of power. They only think they are. The meter is very inaccurate. After my iPod reaches zero, my iPod continues to work for five hours or more.
    If you want the meter to be more accurate, let the iPod run down completely, but don't do this too often. Just once in a blue moon. This will calibrate the meter but has nothing to do with the battery itself.
    The "life-use" of Li-ion batteries is to little too
    (about 500 cycle-charges)
    If you don't like Li-ion, the bad new for you is that Li-ion batteries are now used in all products by all manufacturers. ALL rechargeable batteries, no matter what type they are have a limited number of charge cycles - your phone, your laptop, everything. The only difference with Apple is that they're telling you this up front.
    Do you know or somebodys knows some way to extend
    battery charge?
    No, but if you follow the advice above, hopefully this won't be an issue.

  • HELP - List Menu 2 fields?

    I have a recordset that returns a list of Manager names and
    corresponding Manager ID numbers, which are two separate fields in
    my database. I would like to create a dynamic list menu and display
    both fields. This list menu would be used to drive another search
    based on the what was selected from the menu. I need to be able to
    only select the manager ID number for the search since it is unique
    whereas the manager name could have duplicates. Is this possible???
    Your help is appreciated in advance

    Do you really need them shown? - i.e. a refresh?
    or are you just looking to update 3 fields in the database?
    If you are looking to update the database, you can use the
    $_POST variable to insert into as many fields in the record as you
    want. But his would be done in the MySQL statement, not the
    form.

  • How can validation list/menu

    Hi,
    I am created a form, i want to validation to list/menu (job_code field is mandatory).
    Anybody enter without a Job_code form submission is not happend.
    I am try to validation in dream weaver behavior- validation “field is not display list/menu id”
    please help me code is given below
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
              margin-left: 0px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
    body,td,th {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 12px;
    -->
    </style>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style1 {font-size: 10px}
    -->
    </style>
    </head>
    <body>
    <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="header_print.jpg" width="960" height="171" /></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td colspan="3"><ul id="MenuBar1" class="MenuBarHorizontal">
              <li><a class="MenuBarItemSubmenu" href="#">Home</a>
                  <ul>
                    <li><a href="#">Item 1.1</a></li>
                    <li><a href="#">Item 1.2</a></li>
                    <li><a href="#">Item 1.3</a></li>
                  </ul>
              </li>
              <li><a href="#">Product</a></li>
              <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
                  <ul>
                    <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
                        <ul>
                          <li><a href="#">Item 3.1.1</a></li>
                          <li><a href="#">Item 3.1.2</a></li>
                        </ul>
                    </li>
                    <li><a href="#">Item 3.2</a></li>
                    <li><a href="#">Item 3.3</a></li>
                  </ul>
              </li>
              <li><a href="#">Item 4</a></li>
            </ul>
            </td>
            </tr>
          <tr>
            <td width="16%"> </td>
            <td width="1%"> </td>
            <td width="83%"><form action="careersuccess.php" method="POST" enctype="multipart/form-data" name="frm" class="font">
          <table cellpadding="0" cellspacing="0" border="0" width="99%">
              <tr>
                <td class="body"><strong class="texsmallhead style6">Job Enquiry: </strong></td>
                <td class="body"><div align="left"><img src="pic for web/spacer.gif" width="55" height="1" /></div></td>
                <td> </td>
              </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"><div align="left"></div></td>
                <td> </td>
              </tr>
              <tr>
                <td width="23%" class="textbodyhead"> Position Applied for</td>
                <td width="13%" class="body"><div align="left">:</div></td>
                <td width="64%"><select name="pafor" size="1" id="pafor">
                  <option selected="selected">---Select Postion---</option>
                  <option>General Manager---Job---code: GM_001</option>
                  <option>Senior Manager---Job---code: SM_002</option>
                  <option>PHP Developer</option>
                  <option>Programmer</option>
                  </select>            </td>
            </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"> </td>
                <td> </td>
              </tr>
              <tr>
                <td class="body">Job_Code</td>
                <td class="body">:</td>
                <td><select name="job_code" size="1" id="job_code">
                  <option>-------Select-Job-Code------</option>
                  <option>GM-001- General Manager</option>
                  <option>SM-002-Senior Manager</option>
                </select>
                </td>
              </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"><div align="left"></div></td>
                <td><span class="style1">Job code is mandateory and same as the position applied for</span></td>
              </tr>
            <tr><td style="height:3px"></td></tr>
            <tr>
              <td colspan="3" class="body"><strong class="textbodyhead">QUALIFICATION DETAILS </strong></td>
              </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Graduation</td>
              <td class="body">:</td>
              <td><label>
              <input name="basic_graduation" type="text" id="basic_graduation" size="25" maxlength="30" />
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Post Graduation</td>
              <td class="body">:</td>
              <td><label>
              <input name="PGCOURSE" type="text" id="PGCOURSE" size="25" maxlength="30" />
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td valign="top" class="textbodyhead">Key Skills</td>
              <td valign="top" class="body">:</td>
              <td valign="top"><label>
              <textarea name="skills" id="skills" cols="30" rows="7"></textarea>
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Relevant Experience </td>
              <td class="body">:</td>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="12%"><select
    style="width: 70px;" name="EXPYEAR" id="expyear" class=""><option
    value="-1" selected="selected">Year</option><option value="99">Fresher</option><option
    label="0" value="0">0</option><option label="1" value="1">1</option><option
    label="2" value="2">2</option><option label="3" value="3">3</option><option
    label="4" value="4">4</option><option label="5" value="5">5</option><option
    label="6" value="6">6</option><option label="7" value="7">7</option><option
    label="8" value="8">8</option><option label="9" value="9">9</option><option
    label="10" value="10">10</option><option label="11" value="11">11</option><option
    label="12" value="12">12</option><option label="13" value="13">13</option><option
    label="14" value="14">14</option><option label="15" value="15">15</option><option
    label="16" value="16">16</option><option label="17" value="17">17</option><option
    label="18" value="18">18</option><option label="19" value="19">19</option><option
    label="20" value="20">20</option><option label="21" value="21">21</option><option
    label="22" value="22">22</option><option label="23" value="23">23</option><option
    label="24" value="24">24</option><option label="25" value="25">25</option><option
    label="26" value="26">26</option><option label="27" value="27">27</option><option
    label="28" value="28">28</option><option label="29" value="29">29</option><option
    label="30" value="30">30</option><option value="31">30+</option></select> </td>
                  <td width="2%"> </td>
                  <td width="76%"><select style="width: 90px;"
    name="EXPMONTH" id="expmonth" class=""><option value="-1"
    selected="selected">Month</option><option label="0" value="0">0</option><option
    label="1" value="1">1</option><option label="2" value="2">2</option><option
    label="3" value="3">3</option><option label="4" value="4">4</option><option
    label="5" value="5">5</option><option label="6" value="6">6</option><option
    label="7" value="7">7</option><option label="8" value="8">8</option><option
    label="9" value="9">9</option><option label="10" value="10">10</option><option
    label="11" value="11">11</option></select></td>
                  <td width="10%"> </td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Your Name</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="yr_name" type="text" class="textfield" id="yr_name" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Your E-mail</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="yr_email" type="text" class="textfield" id="pafor3" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Phone / Mobile</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="ph_no" type="text" class="textfield" id="pafor4" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Street Address</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="str_add" type="text" class="textfield" id="pafor5" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> City / State</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="city" type="text" class="textfield" id="pafor6" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Zip / Postal Code</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="postal_code" type="text" class="textfield" id="pafor7" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Country</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="country" type="text" class="textfield" id="pafor8" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr><td style="height:3px"></td></tr>
            <tr>
                <td width="23%" class="body"><strong class="textbodyhead"> Resume</strong></td>
                <td width="13%" class="body"><div align="left">:</div></td>
                <td width="64%"><input type="file" name="strresume"></td>
            </tr>
            <tr>
              <td colspan="3" class="textbody">Attach only word document (.doc)</td>
              </tr>
            <tr>
              <td colspan="3" class="body"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="28%"><img src="pic for web/spacer.gif" width="240" height="1" /></td>
                  <td width="22%"><input type="submit" value="Send" name="submit" onClick="return validate();"></td>
                  <td width="25%"><input type="reset" value="Reset" name="reset" /></td>
                  <td width="25%"> </td>
                </tr>
              </table></td>
              </tr>
          </table>  
         </form></td>
          </tr>
        </table></td>
      </tr>
    </table>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

    Did you ever resolve your validation issue of the 'Position Applied for ' and 'Resume' fields? If not then the solution is below. I've been busy for a couple of days so couldn't get back to this until now.
    <?php
        if(array_key_exists('submit', $_POST)) {
    $pafor = $_REQUEST['pafor'];
    if (empty($pafor)) {
        $error['pafor'] = "Please select a job vacancy";
    $basic_graduation = $_REQUEST['basic_graduation'];
    $PGCOURSE = $_REQUEST['PGCOURSE'];
    $skills = $_REQUEST['skills'];
    $yr_name = $_REQUEST['yr_name'];
    $yr_email = $_REQUEST['yr_email'];
    $ph_no = $_REQUEST['ph_no'];
    $str_add = $_REQUEST['str_add'];
    $city = $_REQUEST['city'];
    $postal_code = $_REQUEST['postal_code'];
    $country = $_REQUEST['country'];
       $strresume_name=$_FILES["strresume"]["name"];
        $strresume_type=$_FILES["strresume"]["type"];
        $strresume_size=$_FILES["strresume"]["size"];
        $strresume_temp=$_FILES["strresume"]["tmp_name"];
    if($strresume_type=="application/octet-stream" or $strresume_type=="text/plain" or $strresume_type=="application/msword")
    $corrcetFile = "Correct file type"; }
        else {
    $error['$strresume_type'] = "Please select a MS Word file";
    if(!isset($error))
            $message= '
    <table cellspacing="0" cellpadding="8" border="0" width="650">
                <tr>
                    <td colspan="2"></td>
                </tr>
                <tr bgcolor="#eeeeee">
                    <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Position Applied for:</strong></td>
                    <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$pafor.'</td>
                </tr>
                <tr>
                <td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Qualification / Details:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"></td>
                  </tr>
                  <tr>
                  <td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Basic/Graduation:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$basic_graduation.'</td>
                  </tr>
                    <tr>
                  <td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Post Graduation:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$PGCOURSE.'</td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Skills:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$skills.'</td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Your Name:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$yr_name.'</td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Your Email:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$yr_email.'</td>
                  </tr>
                   <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Phone/Mobile:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$ph_no.'</td>
                  </tr>
                   <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Street Address:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$str_add.'</td>
                  </tr>
                   <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>City/State:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$city.'</td>
                  </tr>
                   <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Zip/Postal Code:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$postal_code.'</td>
                  </tr>
                  <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Country:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$country.'</td>
                  </tr>
             </table>
        // MAIL SUBJECT
        $subject = "Career Enquiry Form";
        // TO MAIL ADDRESS
        $to="[email protected]";
        // MAIL HEADERS
        $headers  = "MIME-Version: 1.0\n";
        $headers .= "Content-type: text/html; charset=iso-8859-1\n";
        $headers .= "From: Name <[email protected]>\n";
        // MAIL HEADERS with attachment
        $fp = fopen($strresume_temp, "rb");
        $file = fread($fp, $strresume_size);
        $file = chunk_split(base64_encode($file));
        $num = md5(time());
            //Normal headers
        $headers  = "From:<NINDIYA CAREER ENQUIRY FORM>\r\n";
           $headers  .= "MIME-Version: 1.0\r\n";
           $headers  .= "Content-Type: multipart/mixed; ";
           $headers  .= "boundary=".$num."\r\n";
           $headers  .= "--$num\r\n";
            // This two steps to help avoid spam 
        $headers .= "Message-ID: <".gettimeofday()." TheSystem@".$_SERVER['SERVER_NAME'].">\r\n";
        $headers .= "X-Mailer: PHP v".phpversion()."\r\n";       
            // With message
        $headers .= "Content-Type: text/html; charset=iso-8859-1\r\n";
           $headers .= "Content-Transfer-Encoding: 8bit\r\n";
           $headers .= "".$message."\n";
           $headers .= "--".$num."\n";
            // Attachment headers
        $headers  .= "Content-Type:".$strresume_type." ";
           $headers  .= "name=\"".$strresume_name."\"r\n";
           $headers  .= "Content-Transfer-Encoding: base64\r\n";
           $headers  .= "Content-Disposition: attachment; ";
           $headers  .= "filename=\"".$strresume_name."\"\r\n\n";
           $headers  .= "".$file."\r\n";
           $headers  .= "--".$num."--";
        // SEND MAIL
           @mail($to, $subject, $message, $headers);
    fclose($fp);
        header("Location: http://www.bbc.co.uk");
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
              margin-left: 0px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
    body,td,th {
              font-family: Arial, Helvetica, sans-serif;
              font-size: 12px;
    -->
    </style></head>
    <body>
    <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="header_print.jpg" width="960" height="171" /></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td> </td>
            <td> </td>
            <td> </td>
          </tr>
          <tr>
            <td width="16%"> </td>
            <td width="1%"> </td>
            <td width="83%"><form action="form.php" method="POST" enctype="multipart/form-data" name="frm" class="font">
          <table cellpadding="0" cellspacing="0" border="0" width="99%">
              <tr>
                <td class="body"><strong class="texsmallhead style6">Job Enquiry: </strong></td>
                <td class="body"><div align="left"><img src="pic for web/spacer.gif" width="55" height="1" /></div></td>
                <td> </td>
              </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"><div align="left"></div></td>
                <td> </td>
              </tr>
              <tr>
                <td width="23%" class="textbodyhead"> Position Applied for</td>
                <td width="13%" class="body"><div align="left">:</div></td>
                <td width="64%">
                <select name="pafor" id="pafor" onChange="popfield();">
    <option selected="selected" value="">---Select Postion---</option>
    <option value="GM">Gneral Manager</option>
    <option value="AM">Assistant Manager</option>
    <option value="PHD">PHD Developer</option>
    <option>Assist Marketing Executive</option>
    </select><?php if(isset($error['pafor'])) { echo "<span style='color: #C00; padding-left: 10px;'>".$error['pafor']."</span>"; } ?>         </td>
              </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"> </td>
                <td> </td>
              </tr>
              <tr>
                <td class="body">Employee Code</td>
                <td class="body">:</td>
                <td><input type="text" name="emp_code" id="emp_code" value="GM" /></td>
              </tr>
              <tr>
                <td class="body"> </td>
                <td class="body"><div align="left"></div></td>
                <td> </td>
              </tr>
            <tr><td style="height:3px"></td></tr>
            <tr>
              <td colspan="3" class="body"><strong class="textbodyhead">QUALIFICATION DETAILS </strong></td>
              </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Basic/Graduation</td>
              <td class="body">:</td>
              <td><label>
              <input name="basic_graduation" type="text" id="basic_graduation" size="25" maxlength="30" />
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Post Graduation</td>
              <td class="body">:</td>
              <td><label>
              <input name="PGCOURSE" type="text" id="PGCOURSE" size="25" maxlength="30" />
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td valign="top" class="textbodyhead">Key Skills</td>
              <td valign="top" class="body">:</td>
              <td valign="top"><label>
              <textarea name="skills" id="skills" cols="30" rows="7"></textarea>
              </label></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Relevant Experience </td>
              <td class="body">:</td>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="12%"><select
    style="width: 70px;" name="EXPYEAR" id="expyear" class=""><option
    value="-1" selected="selected">Year</option><option value="99">Fresher</option><option
    label="0" value="0">0</option><option label="1" value="1">1</option><option
    label="2" value="2">2</option><option label="3" value="3">3</option><option
    label="4" value="4">4</option><option label="5" value="5">5</option><option
    label="6" value="6">6</option><option label="7" value="7">7</option><option
    label="8" value="8">8</option><option label="9" value="9">9</option><option
    label="10" value="10">10</option><option label="11" value="11">11</option><option
    label="12" value="12">12</option><option label="13" value="13">13</option><option
    label="14" value="14">14</option><option label="15" value="15">15</option><option
    label="16" value="16">16</option><option label="17" value="17">17</option><option
    label="18" value="18">18</option><option label="19" value="19">19</option><option
    label="20" value="20">20</option><option label="21" value="21">21</option><option
    label="22" value="22">22</option><option label="23" value="23">23</option><option
    label="24" value="24">24</option><option label="25" value="25">25</option><option
    label="26" value="26">26</option><option label="27" value="27">27</option><option
    label="28" value="28">28</option><option label="29" value="29">29</option><option
    label="30" value="30">30</option><option value="31">30+</option></select> </td>
                  <td width="2%"> </td>
                  <td width="76%"><select style="width: 90px;"
    name="EXPMONTH" id="expmonth" class=""><option value="-1"
    selected="selected">Month</option><option label="0" value="0">0</option><option
    label="1" value="1">1</option><option label="2" value="2">2</option><option
    label="3" value="3">3</option><option label="4" value="4">4</option><option
    label="5" value="5">5</option><option label="6" value="6">6</option><option
    label="7" value="7">7</option><option label="8" value="8">8</option><option
    label="9" value="9">9</option><option label="10" value="10">10</option><option
    label="11" value="11">11</option></select></td>
                  <td width="10%"> </td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Your Name</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="yr_name" type="text" class="textfield" id="yr_name" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead">Your E-mail</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="yr_email" type="text" class="textfield" id="pafor3" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Phone / Mobile</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="ph_no" type="text" class="textfield" id="pafor4" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Street Address</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="str_add" type="text" class="textfield" id="pafor5" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> City / State</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="city" type="text" class="textfield" id="pafor6" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Zip / Postal Code</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="postal_code" type="text" class="textfield" id="pafor7" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr>
              <td class="textbodyhead"> Country</td>
              <td class="body"><div align="left">:</div></td>
              <td><input name="country" type="text" class="textfield" id="pafor8" size="25" maxlength="100" /></td>
            </tr>
            <tr>
              <td class="body"> </td>
              <td class="body"> </td>
              <td> </td>
            </tr>
            <tr><td style="height:3px"></td></tr>
            <tr>
                <td width="23%" class="body"><strong class="textbodyhead"> Resume</strong></td>
                <td width="13%" class="body"><div align="left">:</div></td>
                <td width="64%"><input type="file" name="strresume"><?php if(isset($error['$strresume_type'])) { echo "<span style='color: #C00; padding-left: 10px';>".$error['$strresume_type']."</span>"; } ?></td>
            </tr>
            <tr>
              <td colspan="3" class="textbody">Attach only word document (.doc)</td>
              </tr>
            <tr>
              <td colspan="3" class="body"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="28%"><img src="pic for web/spacer.gif" width="240" height="1" /></td>
                  <td width="22%"><input type="submit" value="Send" name="submit" onClick="return validate();"></td>
                  <td width="25%"><input type="reset" value="Reset" name="reset" /></td>
                  <td width="25%"> </td>
                </tr>
              </table></td>
              </tr>
          </table> 
    </form></td>
          </tr>
        </table></td>
      </tr>
    </table>
    </body>
    </html>

  • 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>

  • 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

  • List/menu options from database

    Hello
    I need help trying to populate 2 list/menu with some database information.
    Let's suppose that this is my table:
    Id
    Brand
    Model
    1
    ford
    f1
    2
    citroen
    c1
    3
    citroen
    c2
    4
    citroen
    c3
    5
    toyota
    t1
    6
    toyota
    t2
    7
    volvo
    v1
    I have 2 list/menu. One is  the brand menu, which extracts the values  in the brand column of the database (using the DISTINCT statement in MySql). So when you click the menu, these options appear:
    ford
    citroen
    toyota
    volvo
    The  code for that menu is something like  this:
    <select name="menu_marque" id="menu_marque">
    <option value="null">select</option>
    <?php do {  ?>
    <?php
    print '<option  value="'.$row_marque_recordset['marque'].'">'.$row_marque_recordset['marque'].'</option>' ;
    ?>
    <?php } while ($row_marque_recordset =  mysql_fetch_assoc($marque_recordset)); ?>
    </select>
    Now,  I want to do the same for the model menu.  The problem is that I don't know how to write in the Sql, that it  should take the selected value of the brand menu.  I have something like this:
    SELECT modele FROM test WHERE marque  = 'colname' ORDER BY modele ASC
    (where colname is:  $_POST['menu_marque']..... Obviously I am not getting the value by a  POST method, but I tried changing it to something like:
    menu_marque.selectedIndex
    but  it doesn't work...... Any tips on how can I solve this

    Hi DanielAtwood,
    Thanks for your reply...
    Actually when i send the variable in 'WHERE Clause' in Db Adapter query it will retrieve more than one record as the output.
    I want to put that values to a 'SelectOneChoice' component and list down all the values..
    First I tried with data control. But i couldn't find the way to pass the value to the variable(in WHERE clause) to the query in data control view.
    Thanks,
    Nir

  • A simple list menu(!)

    I’m trying to create a simple list menu that will load my .swf file is a scrolling panel. I have played about with Flash 8 a long time ago so im very rusty and getting myself in knots ….
    Here is my attempt can anyone help
    Thanks
    import fl.controls.List;
    import fl.data.DataProvider;
    import flash.net.navigateToURL;
    var defaultMainDisplay:URLRequest = new URLRequest("home.swf");
    // List box info
    var File_list:Array = [
    {label:"Home File", data:home.swf},
    {label:"File 1", data:swf\File1.swf},
    {label:"File 2", data:swf\File2.swf},
    {label:"File 3", data:swf\File3.swf},
    MyList.dataProvider = new DataProvider(File_list);
    MyList.allowMultipleSelection = true;
    MyList.addEventListener(Event.CHANGE, showData):void{
    // I want the selected (data) .swf file to be loaded into a ScrollPalette on the screen replacing the default home.swf
    removeChild(loader);
    var newMainDisplayRequest:URLRequest = new URLRequest(+ event.target.selectedItem.data);
    loader.load(newMainDisplayRequest);;
    addChild(loader);
    mainDisplay.loadMovie("home.swf");

    I thought I might bright it down a level with using frame levels, but without success AGAIN!....
    import fl.controls.List;
    import fl.data.DataProvider;
    var graphic:Array = [
    {label:"Home Page", data:"home"},
    {label:"About", data:"about"},
    {label:"Index", data:"index"},
    myList.dataProvider = new DataProvider(graphic);
    myList.allowMultipleSelection = false;
    myList.addEventListener(Event.CHANGE, showData);
    function showData (event:Event)
    { gotoAndStop (+ event.target.selectedItem.data);
    /// This should make it {gotoAndStop (home, about or index....);}

  • List/menu

    I am trying to update 3 field when I pick field from
    List/menu please help how to do this
    code below
    <select name="LookupLeadNo" id="LookupLeadNo">
    <?php
    do {
    ?>
    <option value="<?php echo
    $row_fmLeads['LeadNo']?>"<?php if
    (!(strcmp($row_fmLeads['LeadNo'], $row_fmcustomer['LeadNo'])))
    {echo "selected=\"selected\"";} ?>><?php echo
    $row_fmLeads['Last Name']?></option>
    <?php
    } while ($row_fmLeads = mysql_fetch_assoc($fmLeads));
    $rows = mysql_num_rows($fmLeads);
    if($rows > 0) {
    mysql_data_seek($fmLeads, 0);
    $row_fmLeads = mysql_fetch_assoc($fmLeads);
    ?>
    </select>

    lotpb wrote:
    > Why when you ask for help on a List/menu its like
    talking to nobody, everyone goes into a slumber. Do i need a
    different app to do what seems not to complicated.
    Maybe its just that today there is no one around how can
    answer your
    question? It can take a while sometimes to get an answer, as
    people who
    can help do it out of there own free time.
    Dooza

  • SetCurrentRow()+List Menu

    I ask for help to deal with the issue. 
    There are two regions ds1 and ds2. 
    Region ds1 lists of musicians, albums and genres. 
    With setCurrentRow () to convey the importance of this line in the form of editing which has a List Menu containing the importance of the region ds2 (genres). Question: How do the right to request that during the editing in the List Menu to display a list of all the region ds2 while to show the current value of the selected region ds1.

    > <form id="quote" name="quote" method="post"
    action="">
    In the action you'll need to call a script that in turn sends
    the email
    to the emails specified.
    In the script you have to assign the emails desired as the
    recipients.
    in PHP it looks something like this (of course very
    simplified)
    in your form:
    <form id="quote" name="quote" method="post"
    action="processform.php">
    <select name="ddlSalesRep"
    id="ddlSalesRep" style="width:248px;">
    <option value="Select a Sales Rep."
    selected="selected">Select a
    Sales
    Rep.</option>
    <option value="[email protected] ">Dan
    T</option>
    <option
    value="[email protected]">Michel</option>
    </select>
    in processform.php
    <?php
    if ($_POST['ddlSalesRep'] != 'Select a Sales Rep.')
    { $recipient = $_POST['ddlSalesRep']; }
    else
    { // default value
    $recipient = [email protected];
    // get other vars from POST
    // define other
    $subject = 'Mysubject';
    $body = ... collection of all vars
    //send
    mail($recipient,$subject,$body);

  • List/menu data passing

    Im sure this is an easy one but it has me stumped. Here is
    the scenario:
    I have a couple list/menu boxes that allow mulitple
    selections. I process a few other items through a php script that
    sends an e-mail out to a specified e-mail address. Everything works
    as planned except I only get the last item selected in the
    list/menu boxes all the way through to the e-mail.
    I have tried adding the ' [ ] ' syntax as discussed in a few
    other articles but have not been able to get this to work.
    Can anyone offer any help? I would be more than glad to
    explain myself further or attach some code. Thanks in advance!
    Sean

    Ok I got the fix.
    I added the '[ ]' on the variable in the form, so the code
    looks like this:
    <select name="email[]" size="4" multiple id="email">
    <option value="1 Accounting">1
    Accounting</option>
    <option value="1 Adjustments">1
    Adjustments</option>
    </select>
    Then I went to the script that processes the form and change
    my variable definitions to this:
    $FTGemail = implode(',',$_POST['email']);

Maybe you are looking for

  • Payment to vendor in PS Module

    Dear Sir, I am going to implement PS module. One query related to payment to vendor. In PS the PR , PO made agianst which MIRO done. Now the payment has to be done in Finance module after activating the WBS but it is not reflecting in PS. In the clie

  • Error -5000 and: Error when loading the transcode setting

    For a couple of days I've been trying to export my project on a DVD, but on the half way of the transcoding it comes the Error -5000, and then there is such a message, something about the navigation, can't be found etc... I work on a mac OS X, using

  • Music player requires title attribute for song nam...

    Hi, I just transferred a set of music to my yellow Lumia 920. Some of the song names do not show up in Lumia music player, and i found the reason : for some of the files, the music file uses the attribute "title". For those files, the song name works

  • HT204266 App Store is not responding , featured and top charts, no reponse

    App Store is not responding

  • Backup Problem on Lifeblog 2.5

    hi! my phone model is n70 and i've got all the data saved nicely in lifeblog 2.5.i'm changing my computer so i decided to backup all the data with the option backup data from lifeblog.the problem is that when saving object 509 from 2075 it stop and s