I have problem to insert values of checkbox and listbox in mysql

Hello

I have a problem during the process of inserting the values of checkbox and listbox value cannot be inserted into the mysql database. I create 2 textbox (named "CanName" and "IDNum"), 1 group checkbox for sex (named "gender []" "") and 1 list box for the list of the program (named "list1 []" ""). When data insert into mysql, only donneesent in the text box can be caught, others are not.

Here is my php code:

 <?php
if(isset($_POST["submitAdd"])){
$CanName=$_POST['CanName'];
$IDNum=$_POST['IDNum'];
$gender=$_POST['gender'];
$programe=$_POST['list1'];


$con=mysql_connect('localhost','root','pass') or die(mysql_error());
mysql_select_db('ses') or die("Cannot select DataBase");


$query=mysql_query("SELECT * FROM candidates WHERE ID='".$IDNum."'");
$numrows=mysql_num_rows($query);
if($numrows==0)
{
$sql="INSERT INTO candidates(Calon,ID,Gender,Programe) VALUES ('$CanName','$IDNum','$gender','$programe')";


$result=mysql_query($sql);


if($result){
echo "Account Successfully Registered";
}else {
echo "Fail to Register!";
}


}else{
echo "That ID Number already exists! Please register with different ID Number.";
}
}
?>

Please someone help me solve this problem... because I'm still new in this programming language.

Sorry for my English.

Thank you.

Try:

foreach ($gender as $value1)

foreach ($programe as $value2) {}

$sql = "INSERT INTO candidates (Calon, ID, Gender, Programe) VALUES ('$CanName', '$IDNum', '$valeur1', ' value2$");

}

[I'm not sensitive of course what a "listbox" is fine as I normally refer to it as a "selectbox" that shouldn't the values to add to a table - list]

Tags: Dreamweaver

Similar Questions

  • I have problems with the installer of Windows and Windows Update, and the solutions that I found for the two each rely on the other broken system to fix the first.

    I use a laptop HP Pavilion dv4-1220us with Windows Vista Home Premium Service Pack 1, a 64-bit operating system, and I have problems with Windows Update and Windows Installer. When I try to install programs, I get the following, or substantially similar message without the error code:

    "Error 1719. The Windows Installer Service could not be accessed. This can occur if Windows Installer is not installed properly. Contact your support team. »

    So I tried to download Windows Installer 4.5 and install it. When I try to start the installation, it always hangs on the first step, "Initializing Installation."

    After searching for a solution to this problem, I found that Windows Update may have a solution. So I downloaded the 64 bit version and got a file named 'file Windows6. 0-KB942288-v2 - x 64. I tried to run this file. He opened a box that said, in order "Prepare for Installation", "Full Preparation", and finally "Searching for Updates ', before you open a second box, which reads" click OK to install the following Windows software update: fix for Windows (KB942288). I clicked on OK in this box, which opened another box, which says at the top "updates are installed" and in a smaller section, "initializing for Installation................... »

    However, no matter how long it works, it never gets past "Setup initialization."... »

    So I tried to run Windows Update in Control Panel. He ran for a while, before giving a message saying "to check the updates, you must first install an update for Windows Update." I clicked on the button that says "install now". He has flashed, a moment, "download and installation of updates' before you go to the"check for Updates"and then he brought back the exact same upward ' to check updates, you must first install an update for Windows Update" message as before. I clicked install now once again, only to go into the exact same loop. After about four times in a loop, I gave up on it.

    So I tried to install Windows Installer 3.1v2, which took a while before saying "not enough memory is available to process this command." and the abandonment of the installation.

    So, I tried to download a program from 'Mr. Fix - it' of Microsoft. It downloaded fine and then failed on installation, because of the same Setup error I received initially.

    Finally, I tried to restart my computer and each solution is represented. Then I clean my computer and each solution is represented.

    In conclusion, the mistakes that I have in Windows Update and Windows Installer cordoned off each other, as the mistakes of each program are based on the other program to be repaired. I'm at my wit's end here. My computer works fine without one, except that I can't install new programs. I can access the internet fine, access files fine, all my scans have developed own... I don't really know what is happening. Can someone help me with this?

    Try the sfc scan:
    http://support.Microsoft.com/kb/936212

    If not, repair of Vista:
    http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html

  • Just last week, on Internet Explorer and Mozilla, I have problems shows a safe web site and pages.

    Only in the last week Internet Explorer and Mozilla are problems displaying or find some website and web pages. It works perfectly fine on another computer. Here are the pages that I shot to the top of many times and they are secure pages. Companies that have been around for years. For example: when I go to my wordpress.com account and try to go to the dashboard, which is where I make changes on the Web site of my blog, and it will not come to the top. Also my site through wordpress will not come to the top. What is going on?

    Hello

    Try this process.

    WinSock and TCP/IP update.

    Type Cmd in the search text box.

    Press Ctrl-Shift-Enter keyboard shortcut to run a command as administrator prompt.  Allow the elevation.

    Type netsh winsock rese t in the command prompt, and then press the Enter key.

    The same processes to refresh the TCP/IP replaces the command typed with.

    netsh int ip reset Press enter

    ipconfig/flushdns press Enter

    Restart your computer.

    Jack - Microsoft MVP, Windows networking. WWW.EZLAN.NET

  • Insert value without vo and eo

    Hi all
    I need to insert the value without vo and Eo
    Here is my code for the controller, please help me
    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    super.processFormRequest (pageContext, webBean);
    OADBTransaction a = null;
    String query = "INSERT INTO VALUES(?,?,?,?) EMPTEST";
    PreparedStatement ps = null;
    a.executeCommand (query);
    PS = a.createPreparedStatement (pageContext.getParameter ("empNO"), 1);
    PS = a.createPreparedStatement (pageContext.getParameter ("FirstName"), 2);
    PS = a.createPreparedStatement (pageContext.getParameter ("LastName"), 3);
    PS = a.createPreparedStatement (pageContext.getParameter ("Email"), 4);
    a.Commit ();
    }

    Hello

    Use the following query:

    StringBuffer stringBuffer = new StringBuffer();
    stringBuffer.append ("INSERT INTO VALUES(:1,:2,:3,:4) EMPTEST ;");
    OADBTransaction oadbTransaction = am.getOADBTransaction ();
    VR;
    {
    oraclePreparedStatement (OraclePreparedStatement) = oadbTransaction.createPreparedStatement (stringBuffer.toString (), 1);
    oraclePreparedStatement.setString (1, pageContext.getParameter ("empNO"));
    oraclePreparedStatement.setString (2, pageContext.getParameter ("FirstName"));
    oraclePreparedStatement.setString (3, pageContext.getParameter ("LastName"));
    oraclePreparedStatement.setString (4, pageContext.getParameter ("Email"));

    oracleResultSet (OracleResultSet) = oraclePreparedStatement.executeQuery ();
    oadbTransaction.commit ();
    }
    catch (sqlexception Exception)
    {
    pageContext.putDialogMessage (new OAException ("OraclePreparedStatement OR OracleResultSet Exception"));
    sqlexception.printStackTrace ();
    }

  • Getting values of checkboxes and e-mailing

    I have several checkboxes name = 'zone [] '.
    the user can check as much as they want.

    To get the value in php I used
    $f_area = $_REQUEST ['area'];

    and if I want to print the values I say

    echo $f_area [0];
    echo $f_area [1];
    echo $f_area [2];

    The problem occurs when the user is checked each unique because it always prints the maximum number of items.
    I know I have to use a loop and run as many times as there are elements in the table so I used the following code does not work.

    $j = count ($f_area);
    $l_area = "";

    for ($i = 0; $i < = $j; $i ++)
    {
    echo $l_area . "< br >".
    }

    can someone let me know what is wrong with my loop?

    OK, I'm really tired. I forgot my $ before the i in the $l_area echo . "
    ";

  • I have problems with Disk1: i/o error and com.apple.xpc... Can someone help me please?

    Hello

    Problem: when I put my computer to sleep, wake up, there is a noticeable delay in performance. Internet is slow to reconnect, and GUI is unresponsive. This occurs for about 10-15 seconds, and then things come back to life.

    What I tried:

    I opened the console, and I copied the report. I found a few warnings, which I post some (in failure).

    core of the host [0]: CoreStorageGroup::completeIORequest - 0xe00002ca error detected for LVG 'Macintosh HD' (4F6A789B-E1E1-458F-908A-844CDFA246CB), pv 31458C 06-C725-4647-A817-A8C8461D59A2, near LV byte offset = 242813976576.

    LHOST kernel [0]: disk1: i/o error.

    LHOST kernel [0]: sandbox: launchd (1) political system: deny (1) - flags-writing files/private/var/run/dyld_shared_cache_x86_64

    LHOST kernel [0]: sandbox: launchd (1) political system: deny (1) file-writing-break the/private/var/run/dyld_shared_cache_x86_64 link

    LHOST com.apple.xpc.launchd [1] (com.apple.backupd.status.xpc): HideUntilCheckIn of the property is a problem of architectural performance. Please transition away from him.

    LHOST com.apple.xpc.launchd [1] (com.apple.cmio.AVCAssistant): ThrottleInterval zero value. You are not so important. Ignorant.

    com Apple.XPC.launchd [1] (com.apple.trustd.agent): ServiceIPC the key is no longer respected. Please delete.

    LHOST com.apple.xpc.launchd [1] (com.apple.bsd.dirhelper): the TimeOut key is no longer respected. He never did anything anyway.

    com Apple.XPC.launchd [1] (com.apple.ZoomWindow.running): HideUntilCheckIn of the property is a problem of architectural performance. Please transition away from him.

    WindowServer [175]: found 13 display modes 0 x 00000000 [13: 0]

    Also, I restarted in safe mode. The problem persists in the newspaper.

    I created a copy of the computer to restart open log normal startup mode and secure boot mode. Then, I created three files containing - text save messages only in regular boot mode, log in startup mode messages safe and save messages in BOTH.

    Save Messages that appear only in the regular boot

    https://www.dropbox.com/s/up6nkk95768xcrb/onlyinnotnsafe.txt?DL=0

    Save Messages that appear only in the secure boot

    https://www.dropbox.com/s/80w2od220asx7e9/onlyinsafe.txt?DL=0

    Save Messages that appear in trunk too of COURSE and regular

    https://www.dropbox.com/s/zoifq5r4inihjaz/overlap.txt?DL=0

    Can someone help me? Should I think about buying a new HD?

    Also noticed - when I have headphones or whatever it is connected to the phone jacks, iTunes spontaneously opens. In addition, in the log messages

    Thank you!!

    Run disk utility. It is located in/Applications/Utiliites

    With open disk utility select the disk to boot on the left then click the first aid tab, then click: run

    Using disk utility to check or repair disks - Apple Support

  • Have problems with the IPSec VPN Client and several target networks

    I use an ASA 5520 8.2 (4) running.

    My goal is to get a VPN client to access more than one network within the network, for example, I need VPN client IPSec and power establish tcp connections on servers to 192.168.210.x and 10.21.9.x and 10.21.3.x

    I think I'm close to having this resolved, but seems to have a routing problem. Which I think is relevant include:

    Net1: 192.168.210.0/32

    NET2: 10.21.0.0/16

    NET2 has several subnets defined VIRTUAL local network:

    DeviceManagement (vlan91): 10.21.9.0/32

    Servers (vlan31): 10.21.3.0/32

    # See the road

    Code: C - connected, S - static, RIP, M - mobile - IGRP, R - I, B - BGP

    D - EIGRP, OSPF, IA - external EIGRP, O - EX - OSPF inter zone

    N1 - type external OSPF NSSA 1, N2 - type external OSPF NSSA 2

    E1 - OSPF external type 1, E2 - external OSPF of type 2, E - EGP

    i - IS - L1 - IS - IS level 1, L2 - IS - IS IS level 2, AI - IS inter zone

    * - candidate by default, U - static route by user, o - ODR

    P periodical downloaded static route

    Gateway of last resort is x.x.x.x network 0.0.0.0

    C 192.168.210.0 255.255.255.0 is directly connected to the inside

    C 216.185.85.92 255.255.255.252 is directly connected to the outside of the

    C 10.21.9.0 255.255.255.0 is directly connected, DeviceManagement

    C 10.21.3.0 255.255.255.0 is directly connected, servers

    S * 0.0.0.0 0.0.0.0 [1/0] via x.x.x.x, outdoor

    I can communicate freely between all networks from the inside.

    interface GigabitEthernet0/0

    Description * INTERNAL NETWORK *.

    Speed 1000

    full duplex

    nameif inside

    security-level 100

    IP 192.168.210.1 255.255.255.0

    OSPF hello-interval 2

    OSPF dead-interval 7

    !

    interface Redundant1.31

    VLAN 31

    nameif servers

    security-level 100

    IP 10.21.3.1 255.255.255.0

    !

    interface Redundant1.91

    VLAN 91

    nameif DeviceManagement

    security-level 100

    IP 10.21.9.1 255.255.255.0

    permit same-security-traffic inter-interface

    NO_NAT list of allowed ip extended access all 172.31.255.0 255.255.255.0

    IP local pool vpnpool 172.31.255.1 - 172.31.255.254 mask 255.255.255.0

    Overall 101 (external) interface

    NAT (inside) 0-list of access NO_NAT

    NAT (inside) 101 192.168.210.0 255.255.255.0

    NAT (servers) 101 10.21.3.0 255.255.255.0

    NAT (DeviceManagement) 101 10.21.9.0 255.255.255.0

    static (inside, DeviceManagement) 192.168.210.0 192.168.210.0 netmask 255.255.255.0

    static (inside, servers) 192.168.210.0 192.168.210.0 netmask 255.255.255.0

    static (servers, upside down) 10.21.3.0 10.21.3.0 netmask 255.255.255.0

    static (DeviceManagement, upside down) 10.21.9.0 10.21.9.0 netmask 255.255.255.0

    access list IN LAN extended permitted tcp 192.168.210.0 255.255.255.0 any

    access list IN LAN extended permit udp 192.168.210.0 255.255.255.0 any

    LAN-IN scope ip 192.168.210.0 access list allow 255.255.255.0 any

    LAN-IN extended access list allow icmp 192.168.210.0 255.255.255.0 any

    access list IN LAN extended permitted tcp 10.21.0.0 255.255.0.0 any

    access list IN LAN extended permitted udp 10.21.0.0 255.255.0.0 any

    LAN-IN scope 10.21.0.0 ip access list allow 255.255.0.0 any

    LAN-IN extended access list allow icmp 10.21.0.0 255.255.0.0 any

    standard access list permits 192.168.210.0 SPLIT-TUNNEL 255.255.255.0

    standard access list permits 10.21.0.0 SPLIT-TUNNEL 255.255.0.0

    group-access LAN-IN in the interface inside

    internal VPNUSERS group policy

    attributes of the VPNUSERS group policy

    value of server DNS 216.185.64.6

    Protocol-tunnel-VPN IPSec

    Split-tunnel-policy tunnelspecified

    Split-tunnel-network-list value of SPLIT TUNNEL

    field default value internal - Network.com

    type VPNUSERS tunnel-group remote access

    tunnel-group VPNUSERS General attributes

    address vpnpool pool

    strategy-group-by default VPNUSERS

    tunnel-group VPNUSERS ipsec-attributes

    pre-shared key *.

    When a user establishes a VPN connection, their local routing tables have routes through the tunnel to the 10.21.0.0/16 and the 192.168.210.0/32.

    They are only able to communicate with the network 192.168.210.0/32, however.

    I tried to add the following, but it does not help:

    router ospf 1000

    router ID - 192.168.210.1

    Network 10.21.0.0 255.255.0.0 area 1

    network 192.168.210.0 255.255.255.252 area 0

    area 1

    Can anyone help me please with this problem? There could be a bunch of superfluous things here, and if you could show me, too, I'd be very happy. If you need more information on the config, I'll be happy to provide.

    Hello Kenneth,

    Based on the appliance's routing table, I can see the following

    C 10.21.9.0 255.255.255.0 is directly connected, DeviceManagement

    C 10.21.3.0 255.255.255.0 is directly connected, servers

    C 192.168.210.0 255.255.255.0 is directly connected to the inside

    And you try to connect to the 3 of them.

    Politics of Split tunnel is very good, the VPN configuration is fine

    The problem is here

    NO_NAT list of allowed ip extended access all 172.31.255.0 255.255.255.0

    NAT (inside) 0-list of access NO_NAT

    Dude, you point to just inside interface and 2 other subnets are on the device management interface and the interface of servers... That is the question

    Now how to solve

    NO_NAT ip 192.168.210.0 access list allow 255.255.255.0 172.31.255.0 255.255.255.0

    no access list NO_NAT extended permits all ip 172.31.255.0 255.255.255.0

    NO_NAT_SERVERS ip 10.21.3.0 access list allow 255.255.255.0 172.31.255.0 255.255.255.0

    NAT (SERVERS) 0 ACCESS-LIST NO_NAT_SERVERS

    Permit access-list no.-NAT_DEVICEMANAGMENT ip 10.21.9.0 255.255.255.0 172.31.255.0 255.255.255.0

    NAT (deviceManagment) 0-no.-NAT_DEVICEMANAGMENT access list

    Any other questions... Sure... Be sure to note all my answers.

    Julio

  • AS2 - problem with inserting of partition/name of the database/mysql

    Hello

    First of all... Sorry that I havn't put the ACE in a box, do not know how to do it on this forum!

    Okay, so here's my problem:

    I want to submit my score and the name in my database.

    This is the script I've tried Flash.

    Stop();

    create objects loadVars

    playerx = new LoadVars();

    playerRegistered = new LoadVars();

    playerRegistered.onLoad = showResult;

    create the button handler code to call the function that sends & load php

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerRegistered);

    }

    This is the PHP script:

    <? PHP

    $connect = mysql_connect('x.com.mysql','x','password');

    @mysql_select_db ('x', $connect);

    $sql = "INSERT INTO high_scores_avoidthecars (name, score) VALUES ("'. ")" $_POST ['name']. '"," '. $_POST ['score'].'") ';"

    ? >

    Nothing is posted to the database, no errors etc... any ideas?

    If you went thru the link I provided you should see where you need to change the code that you did to get the Flash to work code.  Here is a link to an example of work that takes into account the second part of the code in this link that involves sending data (from line 28) with your textfields, etc.

    http://www.nedwebs.com/Flash/register.html

    The main problem with your AS2 code involves the following line...

    playerx.sendAndLoad ("register.php");

    It should be...

    playerx.sendAndLoad ("register.php", playerx. 'POST');

    Here's the code I used for the example files, I did...

    AS2 CODE

    playerx = new LoadVars();

    _root.submitt.onRelease = submitScore;

    function submitScore (): Void {}

    Response.Text = "clicked\n";

    playerx. Name = name_txt.text;

    playerx.score = score_txt.text;

    playerx.sendAndLoad ("register.php", playerx, "POST");

    }

    playerx.onLoad = onLoadCallBack;

    function onLoadCallBack (success)
    {
    Response.Text += "onLoad Processed\n";

    {if (success)}
    Response.Text += "Success\n;
    Response.Text += this.lVar1 + "\n";
    Response.Text += this.lVar2;
    } else {}
    Response.Text = "load error".
    }
    }

    PHP CODE

    <>
    read the variables
    $var1 = $_POST ['name'];
    $var2 = $_POST ['mark'];

    Send variables
    echo "& lVar1 = $var1 return &";.
    echo "& lVar2 = $var2 returned as well &";.
    ?>

  • I have problems to install the UEFI BIOS and UEFi diagnostic on my HP probook 4530 s

    I recently bought the probook 4530 s, but for some reason, my hard drive has begun to view the status of the dynamics. I reinstalled the window and the status of the disk was returned to base. However, now I have a problem in installing UEFI BIOS and UEFI diagnostics. whenever I try to install it, a message that you do not have HP_Tool partition would like to install it? I hit the Yes button, but as I already have 4 discs on my new system fail to form. Thus, the operation failed.  so can you help me solve this problem?

    Hello

    Go to control panel, administrative--> computer management tools, and then disk management.  Take a look in the box that is the Center and the top. List of all partitions and the layout and type.

  • Microsoft uses independent companies for phone users to tell them that they have problems with their MS mild wear and offer to sort by phone?

    Microsoft uses independent companies for phone users to offer sort the problems that we are not informed by phone, or is - this another scam?

    Scam.

    See here: -.

    http://www.ComputerActive.co.UK/CA/PC-help/2134917/genuine-Microsoft

  • I have problem with one. PST file and send the screenshot of this question by e-mail, but cannot be displayed in a zoomed images.

    Original title: expansion of the e-mail.

    I used scrpnt for a page to a friend and then he sent an email and she said that she could not read, so I looked into this area and shes right, is possible for an enlarged image of a full page by e-mail... (text document

    Hi Charles,

    Thanks for sharing this information with us.

    I am happy to know that the problem is solved, this will help other members of the community to the same question.

    Please do not hesitate to visit our Web site for any help with Windows Operating System.

  • I have problems with the links and footer

    I have problems with hypertext links (they sparkle and also highlight other text on the page) and also the footer space for always lights in site preview mode, even though I did little master and home page and the following pages.  This happened only after I loaded a file of MUSE in the current version of Muse CC put running up-to-date on the imported file to Muse.  Please help me Adobe Community.

    Once you have opened the file 2014.3 muse you will not be able to open it in a previous version anyway. In order to keep the updated version.

    In this version, Yes, Muse will run an optimization when you open a site. My suggestion is that optimization is made to save the file, so it doesn't have to do it again. I am convinced that a full download should solve your problem. I had a few sites that I need to do a full download myself and all is well.

  • Problems with Windows 10 screen standby and sleep mode

    After downloading 10 Windows on my desktop all-in-one HP, I have problems with the display of standby and sleep mode.  When the computer turns off, he doesn't have the bright screen.

    After the upgrade to Windows 10, some laptops have experienced one or more of the following symptoms:

    • > Power LED remains lit after stopping
    • > Computer enters standby or hibernation.

    HP recommends that customers see these symptoms first update the graphics drivers by removing and then reinstalling the hardware in Device Manager.

    See the section updating the graphics driver from where can I find drivers Windows 10 and software for my model?

  • Problem with update of Photoshop, Illustrator and Indesign CS6

    Hi all. I have problem with update of Photoshop, Illustrator and Indesign on OSx 10.8.4 CS6. Application are OK but update (bug fixies) does not work. Update failed. (U44M1P7)Screen Shot 2013-07-30 at 16.11.09.png

    Hi El Gondo,

    The following could explain and help solve the problem...

    U44M1P7 - updates:

    http://helpx.Adobe.com/Creative-Suite/KB/error-u44m1p7-installing-upda tes-HYPERLINK

    U44M1P7, U44M2P7 - CC help / cannot apply the extensions 6.0.2 update manager | Mac OS:

    http://helpx.Adobe.com/Creative-Suite/KB/unable-apply-extension-manage r - update.html

    Thank you!

    Ankit

  • Problem with the value of the checkbox and app.settings.getSetting)

    Hello everyone.

    I have a problem with is settings saved for checkbox.

    Saved settings does not apply on the value of the checkbox.

    It's strange, but it always 'true '.

    Here is piece of code:

    checkMe = 11;    //any value for the first time running
    
    
    if (app.settings.haveSetting("savea", "chck")) {                            
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                            }
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
                            }
         alert("Yes, checkMe will = "+checkMe)        
        
        
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    
    var fff = win.checkPanel.chkOne.value;  // string for alert
     alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    
    
    
    
    win.checkPanel.chkOne.onClick  = function () {
            
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
              }
    
    

    win.checkPanel.chkOne.value is always true.

    Can anyone exmplain why and how to get rid of this static value?

    P.S. just in case, here's the complete code:

    function mainFun() 
    {
    
    
        this.windowRef = null;
    }
    
    
    
    
    mainFun.prototype.run = function()
    {
        
        /*----- UI -----*/
              var retval = true;
              var win = new Window("palette", "Check option", [150, 150, 460, 455]);
              this.windowRef = win;
    
    
        
              win.checkPanel = win.add("panel", [25, 150, 285, 265], "Checkbox");
              win.checkPanel.chkOne = win.checkPanel.add("checkbox", [10, 15, 125, 35], "Checkbox One");
              //win.checkPanel.chkTxtOne = win.checkPanel.add('edittext', [140, 15, 230, 35], '');
    
    
         win.quitBtn = win.add("button", [110,275,200,295], "Close");
    
    
    checkMe = 11;    //any value for the first time running
    
    
    if (app.settings.haveSetting("savea", "chck")) {                            
                          checkMe = app.settings.getSetting("savea", "chck");  // get saved value, else 11
                          alert("checkMe = "+checkMe)
                            }
                        if(checkMe == 11){
                            checkMe= false;   //if there is no saved settings, checkbox value will be false/ unchecked
                            alert("You run this script first time, so manual value will be 'false'")
                            }else{
                                checkMe = app.settings.getSetting("savea", "chck");     // if saved settings exist, get true or false
                            }
         alert("Yes, checkMe will = "+checkMe)        
        
        
    win.checkPanel.chkOne.value = checkMe;  /// checkbox value will equal saved checkMe
    
    var fff = win.checkPanel.chkOne.value;  // string for alert
     alert("aha! but checkbox value is  = " +fff+ "\n Why so?")     // here we`ve got always "true"
    
    
    
    
    win.checkPanel.chkOne.onClick  = function () {
            
        var path11 = win.checkPanel.chkOne.value;  //  checkbox value to variable
        app.settings.saveSetting("savea", "chck", path11);  //saving checkbox value
        alert("Saved this value - " + app.settings.getSetting("savea", "chck"))
              }
    
    
    
    
    
    
              win.quitBtn.onClick = function() { 
                  win.close(); 
              }
    
    
        win.center();
              win.show();
    
    
              return retval;
      
    }
    
    
    if(typeof(mainFun_unitTest) == "undefined") {
        new mainFun().run();
    }
    
    

    A quick glance, I'd say it's because when the pref that is saved as a string, so after having read it you must control if (checkMe == 'true') rather than check it out as a Boolean value.

Maybe you are looking for