PHP Form Validation and Insert Records

Hi There,
I've been scratching my head for 2 days and couldn't find a solution.
Here is my problem:
Go to http://ecopethandbags.com/contactTest.php and click the "Send Comments" button.
You will see that the validation works.
Now, go to http://ecopethandbags.com/contactTestInsert.php, this time, I've inserted the "Insert Record" server behavior.
Click the "Send Comments" button again.
You will see the ugly message like "Column 'firstname' cannot be null" in a plain white page.
My question is:
How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
I am attaching the files.
Thank you for you help!

boloco wrote:
My question is:
How can I insert the PHP form records in my database and take advantage of the form validation nicely like in http://ecopethandbags.com/contactTest.php
Use simple PHP logic to merge the scripts together.
Dreamweaver automatically puts the Insert Record server behavior code at the top of the script. You need to adapt it so that the validation is done first. If the validation succeeds, use the Insert Record server behavior. If not, redisplay the form.
if (array_key_exists('send', $_POST)) {
  // validate the form input
  if (!$suspect && empty($missing)) {
  // send the mail
    if ($mailSent) {
    unset($missing);
    // insert the Insert Record server behavior code here

Similar Messages

  • PHP Form Validation and Radio Group

    Hi David,
    I'm trying to set the initial state of a radio group to none.
    Please look at the file http://ecopethandbags.com/contact.php. The initial state is set to "No"
    In Dreamweaver, I've set the initial state to "Unchecked"
    I don't understand the code for the radio buttons in my file (see attachment).
    What I am trying to do is to have the radio group initially unchecked but required.
    I have 2 questions:
    1) - How can I control the initial status of the radio group when I use the PHP form validation?
    2) - How can I set the validation so, when one of the radio buttons is not checked by the user, a warning flag like "Please make a choice" comes up.
    Thank you much!

    Just change the following section of code:
    <?php
    if (!$_POST || isset($missing) && $_POST['subscribe'] == 'n') {
      echo 'checked="checked"';
    } ?>
    Remove the !$_POST || like this:
    <?php
    if (isset($missing) && $_POST['subscribe'] == 'n') {
      echo 'checked="checked"';
    } ?>
    The checked="checked" will be inserted into the code only if the form has been submitted, but neither radio button has been selected.

  • How add new HTML5 input tags to Insert,Form menu and Insert,Tag,HTML?

    how do I add new HTML5 input tags to the Insert,Form menu and Insert,Tag,HTML tags menus of dw cs5?
    I remember seeing some documentation about the latter, but it wasn't very good.  can't figure out how to actually implement something, so need a mentor - and I am a software developer. :-/
    http://help.adobe.com/en_US/dreamweaver/cs/extend/WS5b3ccc516d4fbf351e63e3d117f53d77c2-800 0.html
    but I am not sure what this applies to.  manual is not clear on this.

    I am removing it from my WATCHES since I find out what was wrong. In the submit.jsp, current needs to be setup instead of create.
    <jbo:Row id="myrow" datasource="ds" action="current" >
    Have a great week.
    Kamran

  • PHP URL Variable from Insert Record Issue

    I have a very simplistic forum style website I have put together. Everything is functionally properly except for one aspect. The basic structure is a page that lists the existing threads (ie: ThreadA, ThreadB, and ThreadC). I have the name of these threads stored in a MySQL database table that is used to generate a repeating dynamic table to grow as the number of threads increases. If the user clicks on one of these links they are taken to a page that displays all of the comments pertaining to that thread. All of the comments are stored in another MySQL database table. I perform a query on this comments page to filter the information in the comments database by the thread name which is passed over from the first page via a URL variable. The link attached to the name of the thread in the repeating table that generates the URL variable is "comments.php?thread=<?php echo $row_threads['threadName']; ?>" This works perfectly, If the user clicks on ThreadB they are taken to the comments page where only the comments pertaining to ThreadB have been filtered and displayed. After the user inserts a comment form ThreadB the comments page reloads displaying the newly created comment.
    Also, on the first page, the user has the option to create a new thread; call it ThreadD. The name of this new thread has to be inserted into two tables; one in the master threads table and one in the comments page any time someone adds a comment. (I'm sure there is a better way to structure this, but this was all I could figure out and for my purposes at hand it is sufficient). When the user is taken to this new comment page I have a query set up to pull the last entry in the threads table from the logged in user, ie the newly created thread topic. I have dragged this query to the page to make sure it is pulling the correct thread heading, and it works just fine. What I'm wanting to have happen is after the user enters the first comment I'm wanting them to be redirected to the main comments page with their new comment listed; giving the illusion that the new comment and existing comments page are the same. I'm trying to pass the newly created thread name, ThreadD, in the URL to the main comments page just like I do if they select it from the existing threads page. Under the insert record wizard I click the 'browse' button to select the comments.php page. I then select 'parameters' to add the thread name query as the URL parameter. The generated code is "comments.php?thread=" . $row_threadName['threadName'] . "". The user does go to the main comments page but the URL variable is not coming with it. What I'm left with in the address bar is ..."/comments.php?thread=&" , but it should be ..."comments.php?thread=ThreadD". I tried copying and pasting the URL link from the existing threads page since that works perfectly, and when I do that the main comments page shows up blank after being redirected from the new comments page. If I hard code this, for testing purposes, into the redirect after insertion section (ie: "comments.php?thread=ThreadD") everything works perfectly and the URL in the address bar of the main comments page is "...comments.php?thread=ThreadD&" I noticed the extra "&", but didn't give it much thought since the site is giving me the behavior I'm looking for. My question is, how do I get this new comment page to pass the variable of the newly created thread name to the main comments page to behave like it does when the thread is selected from the list of existing threads? I know it has to do with how the URL variable is either being generated or built from my query, or how I have it listed in the redirect section of the insert wizard, but I can't figure out where I am going wrong. Please let me know if there are any questions or if I need to clarify any aspect. Any and all help is always appreciated. Thank you.

    Ok, so just to summarize so I am understanding this correctly.  You have an ordering page for tires/wheels.  A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.).  But on another summary page the symbol is returning a blank value.
    If this is correct we need to see:
    - First, the code that is inserting the symbol to the database table in question
    - Second, the query and code where you are printing the data to the screen.

  • Form Email and Insert to DB

    I'm trying to get a form both - email and insert into a database the form information.  Below, you can see the code I am using.
    Here is my setup:
    1. I have a form where the action is a file called formmail.php
    2. This file inserts the data into a database and then includes another file called phpmail.php
    3. phpmail.php first looks in a file called zipcodes.php where I've set a number of arrays for various possible zipcodes.
    4. phpmail.php then emails the form data to the email addresses associated with those zipcodes.
    Without the formmail.php step - it works perfectly.
    With the formmail.php step - it inserts it into a database, checks if the email address is formatted correctly, but does not email anyone.
    Do you know why?   Below is the code for the various files:
    formail.php
    <?php
    $con = mysql_connect("localhost","user","password");
    if (!$con)
    die('Could not connect: ' . mysql_error());
    mysql_select_db("phtsystem", $con);
    $sql="INSERT INTO leads (firstname, lastname, address, city, `state`, zip, phone, email, comments, reason) VALUES ('$_POST[name2]','$_POST[last_name]','$_POST[address]','$_POST[city]','$_POST[state]','$_POST[zip]','$_POST[phone2]','$_POST[email]','$_POST[comments]','$_POST[reason]')";
    if (!mysql_query($sql,$con))
    die('Error: ' . mysql_error());
    include "phpmail.php";
    ?>
    phpmail.php
    <?php
    include("zipcodes.php");
    $zip=$_POST["zip"];
              if (in_array($zip, $Nashville)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Knoxville)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Huntsville)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Florida)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Georgia)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $SouthCarolina)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $NorthCarolina)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Pennsylvania)) {
    $my_email = "[email protected], [email protected], [email protected]";
              }elseif (in_array($zip, $Maryland)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
               }elseif (in_array($zip, $Virginia)) {
    $my_email = "[email protected], [email protected], [email protected], [email protected]";
               }elseif (in_array($zip, $Texas)) {
    $my_email = "[email protected], [email protected], [email protected]";
    } else { $my_email = "[email protected], [email protected], [email protected]";
    $continue = "/";
    $errors = array();
    if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}}
    function recursive_array_check_header($element_value)
    global $set;
    if(!is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$element_value)){$set = 1;}}
    else
    foreach($element_value as $value){if($set){break;} recursive_array_check_header($value);}
    recursive_array_check_header($_REQUEST);
    if($set){$errors[] = "You cannot send an email header";}
    unset($set);
    if(isset($_REQUEST['email']) && !empty($_REQUEST['email']))
    if(preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";}
    $_REQUEST['email'] = trim($_REQUEST['email']);
    if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}}
    if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}
    function recursive_array_check_blank($element_value)
    global $set;
    if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}}
    else
    foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);}
    recursive_array_check_blank($_REQUEST);
    if(!$set){$errors[] = "You cannot send a blank form";}
    unset($set);
    if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;}
    if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");}
    function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}
    $message = build_message($_REQUEST) . "This email is from the website.  If it doesn't say specifically what the person is contacting us about, it is most likely a sales lead.";
    $message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL."";
    $message = stripslashes($message);
    $subject = "New Lead from PHT.com";
    $headers = "From: " . $_REQUEST['email'];
    mail($my_email,$subject,$message,$headers);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Dreamweaver Tutorial - Contact Form</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-28969997-1']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    </script>
    </head>
    <body bgcolor="#ffffff" text="#000000">
    <div>
    <center>
    <b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b>
    <br>Your message has been sent
    <p><a href="<?php print $continue; ?>">Click here to continue</a></p>
    </center>
    </div>
    </body>
    </html>
    zipcodes.php
    <?php
    $Nashville = array (37010, 37027, 37040, 37055, 37067, 37075, 37088, 37121, 37133, 37152, 37179, 37201, 37209, 37217, 37228, 37238, 37246, 37015, 37034, 37048, 37063, 37071, 37082, 37115, 37129, 37141, 37167, 37186, 37205, 37213, 37221, 37234, 37242, 37250, 38487, 37011, 37029, 37041, 37056, 37068, 37076, 37089, 37122, 37135, 37153, 37180, 37202, 37210, 37218, 37229, 37239, 37247, 37022, 37035, 37049, 37064, 37072, 37085, 37116, 37130, 37143, 37171, 37187, 37206, 37214, 37222, 37235, 37243, 38401, 37013, 37031, 37043, 37060, 37069, 37077, 37090, 37127, 37136, 37155, 37181, 37203, 37211, 37219, 37230, 37240, 37248, 37024, 37036, 37051, 37065, 37073, 37086, 37118, 37131, 37146, 37172, 37188, 37207, 37215, 37224, 37236, 37244, 38476, 37014, 37032, 37046, 37062, 37070, 37080, 37098, 37128, 37138, 37165, 37184, 37204, 37212, 37220, 37232, 37241, 37249, 37025, 37037, 37052, 37066, 37074, 37087, 37119, 37132, 37148, 37174, 37189, 37208, 37216, 37227, 37237, 37245, 38482);
    ?>
    <?php
    $Knoxville=array(37354, 37709, 37717, 37726, 37737, 37755, 37763, 37770, 37777, 37803, 37819, 37830, 37842, 37849, 37865, 37874, 37886, 37901, 37914, 37918, 37922, 37928, 37932, 37940, 37996, 38504, 37381, 37710, 37719, 37729, 37742, 37756, 37764, 37771, 37779, 37804, 37826, 37831, 37845, 37852, 37866, 37878, 37887, 37902, 37915, 37919, 37923, 37929, 37933, 37950, 37997, 38557, 37701, 37714, 37721, 37732, 37748, 37757, 37766, 37772, 37801, 37806, 37828, 37840, 37846, 37853, 37871, 37882, 37892, 37909, 37916, 37920, 37924, 37930, 37938, 37990, 37998, 38558, 37705, 37716, 37723, 37733, 37754, 37762, 37769, 37774, 37802, 37807, 37829, 37841, 37847, 37854, 37872, 37885, 37893, 37912, 37917, 37921, 37927, 37931, 37939, 37995, 37999);
    ?>
    etc...
    Message was edited by: Drymetal

    Scratch that.  It does work perfectly.   It just took the stupid server 20 minutes to send the emails. 

  • CFForms and Insert Record

    Ok, so I'm playing around with the cfforms tag and the rich
    text editor capabilities. But I noticed that after setting up the
    form, I wasn't able to use the "Insert Record" option from the
    Applications > Server Behaviors panel. When I try to use it, it
    tells me that I need toinsert a form onto the page first. Just
    wondered if someone can shed some light on this.

    Hello,
       As Javier said you can use the Merge Statement, and you can use the Merge Statement with dynamic sql. Please check the below merge statement used dynamic sql.
    DECLARE @SqlStatement NVARCHAR(MAX)
    SET @SqlStatement = N'MERGE Destination as target
    USING Source as source
    on (target.ServerName = Source.ServerName)
    WHEN NOT MATCHED BY TARGET THEN
    INSERT (ServerName, ID) VALUES (ServerName, ID)
    WHEN NOT MATCHED BY SOURCE THEN
    UPDATE SET DateDeleted = GETDATE();'
    EXEC sp_executesql @sqlStatement
    Abhi.
    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been
    useful to you

  • ESB performance issue: takes too long to select and insert records in DBs

    Hi,
    I have an ESB service which has to select data from seven different tables(using join operations) of one database and insert it into a single table of another database.
    It takes unduly long time to do this operation.
    For ex: it takes over 2 hours to select and insert 3000 records.
    When ran the same query to select the records from the tables using SQL developer, it took only 23 seconds.
    Do I need to change any configuration settings in the enterprise manager or someother place to increase the performance. Someone please advice.
    I am using Oracle SOA Suite 10.1.3.4
    Thanks,
    RV

    Hi,
    I have an ESB service which has to select data from seven different tables(using join operations) of one database and insert it into a single table of another database.
    It takes unduly long time to do this operation.
    For ex: it takes over 2 hours to select and insert 3000 records.
    When ran the same query to select the records from the tables using SQL developer, it took only 23 seconds.
    Do I need to change any configuration settings in the enterprise manager or someother place to increase the performance. Someone please advice.
    I am using Oracle SOA Suite 10.1.3.4
    Thanks,
    RV

  • Php form problem and question

    I am a new web designer who is not code savey yet. Anyway
    during the various sites i have designed i have used 3 different
    forms that process and email it to me using a seperate php form, 1
    in flash, 2 from a standard html form on a windows server. All have
    been uploaded, to the site, tested and worked fine. 2 are in old
    sites, one in my current site. Recently all 3 forms stopped working
    and while they looked like they worked fine they no longer actually
    sent anything. I had a big email arguement with my host and finally
    they added this line into my php script "ini_set
    ("sendmail_from","[email protected]");" email address is example here
    and they added another form to my site called "php4-cgi-fcgi.ini."
    Then my curent form started working again. I haven't changed
    anything, and of course the host never informed me of any changes.
    So why did this need to be added for my form to work again? Does
    this mean they upgraded to another version or something? Ihad a big
    arguement with them because they refused to tell me what they did
    that stopped all my forms from working, they kept acting like it
    was me or my provider that caused the problem, when i am positive
    we were not the problem. Any thoughts?

    doing a google on "ini_set ("sendmail_from" gives a lot of
    info.
    summary- the form script you are using is probably not
    setting a default
    "FROM" email address, so the host has phpmail() reject it as
    possible spam
    abuse.
    The .ini files the host added to your site correct the
    problem. They change
    values for php to use within your hosting domain.
    What php script are you using to send the emails? It is
    probably out of date
    if it doesn't address this issue.
    Off Topic: suggest never arguing with hosting support. Even
    it the person at
    the other end of the phone is an 18 year old drone not
    earning their salt.
    Move the site if needed. Develop social engineering skills to
    get things
    done.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • Validations when inserting records into database using table control?

    hi , guru's.
          iam inserting records into database table through table control when i press insert i want check which record is existing and which is not . so please give me any sample code
    regards,
    satheesh.

    hi , arjun.
    please check this code.
        WHEN 'INSERT'.
        data: g_vcontrol_itab1 like table of zcust_call_rec,
              g_vcontrol_wa1 like g_vcontrol_wa.
         SELECT *  FROM zcust_call_rec
                   INTO CORRESPONDING FIELDS OF TABLE g_vcontrol_itab1
                   FOR ALL ENTRIES IN g_vcontrol_itab
                   WHERE kunnr = g_vcontrol_itab-kunnr AND budat = g_vcontrol_itab-budat.
            loop at g_vcontrol_itab into g_vcontrol_wa.
               read table g_vcontrol_itab1 into g_vcontrol_wa1
                    with table key  g_vcontrol_wa-kunnr = kunnr and g_vcontrol_wa-budat = budat.
                     if sy-subrc = 0.
                       delete g_vcontrol_itab.
                     endif.
            endloop.
          LOOP AT g_vcontrol_itab INTO g_vcontrol_wa.
            INSERT into zcust_call_rec values g_vcontrol_wa.
          ENDLOOP.
    with this iam getting error message like this.
              <b>g_vcontrol_wa-budat is not expected.</b>

  • HELP!! Stored Procedures - Adding and Inserting Records

    Can ANYONE tell what I'm doing wrong? I'm learning PL/SQL, and I don't know what I'm missing here.
    For starters, I'm trying to write a stored procedure to:
    -- insert data into a NULL column added using ALTER TABLE
    -- there's about +/- 45 records where this data needes to be added.
    -- the value for each null field in the column is a random value (that is, generated using dbms_random.random
    I've tried several ways to write the procedure, but have run against a wall to determine what I'm missing.
    Here's the SQL statements and the error messages:
    SQL> CREATE OR REPLACE PROCEDURE update_proj_number (p_proj4_id IN VARCHAR2)
    2 AS
    3 BEGIN
    4 DECLARE
    5 v_counter NUMBER(5) := 0;
    6 END;
    7 BEGIN
    8 v_counter := 0;
    9 dbms.random.initialize(32768);
    10 v_counter := v_counter + 1;
    11 p_proj4_id := dbms.random.random
    12 UPDATE sample_trades
    13 SET proj4_id = RANDOM(p_proj4_id);
    14 exit when NOTFOUND%;
    15 END;
    16 /
    Warning: Procedure created with compilation errors.
    SQL>
    SQL> SHOW ERRORS
    Errors for PROCEDURE UPDATE_PROJ_NUMBER:
    LINE/COL ERROR
    6/2 PLS-00103: Encountered the symbol "END" when expecting one of the following:
    begin function package pragma procedure subtype type use <an identifier>
    <a double-quoted delimited-identifier> cursor form current
    12/3 PLS-00103: Encountered the symbol "UPDATE" when expecting one of the following:
    . ( * @ % & = - + ; < / > in mod not rem an exponent (**)
    <> or != or ~= >= <= <> and or like between is null is not &#0124; &#0124; is dangling
    The symbol ";" was substituted for "UPDATE" to continue.
    14/22 PLS-00103: Encountered the symbol ";" when expecting one of the following:
    ( type <an identifier> <a double-quoted delimited-identifier>
    SQL>
    Would it be more efficient to use a cursor to fetch the rows containing the null value or is a stored procedure OK for this?
    Also, I would like to have a second example of a stored procedure that will add random rows to a table (that is, create duplicates of information already in the table). This stored procedure will also use dbms_random.
    For example,
    IF p_value1 = 'FIRST_VALUE' then
    add this record (incl. random_val for key);
    ELSIF p_value = 'SECOND_VALUE' then
    add that record (incl. random_val for key);
    and on and on.
    Much thanks to anyone who can help.
    For example,
    null

    Try this
    CREATE OR REPLACE PROCEDURE update_proj_number (p_proj4_id IN VARCHAR2)
    AS
    v_counter NUMBER(5) := 0;
    BEGIN
    v_counter := 0;
    dbms.random.initialize(32768);
    v_counter := v_counter + 1;
    p_proj4_id := dbms.random.random ;
    UPDATE sample_trades
    SET proj4_id = RANDOM(p_proj4_id);
    END;
    /

  • PHP Form Validation: Radio Buttons

    Hey everyone -
    I'm trying to do two things here with an addition to one of
    my forms using
    PHP.
    1. Attempting to validate if one of the radio buttons has
    been selected.
    2. Displaying which radio button is selected once the page is
    reloaded
    (checking for validation errors). That is - if they've
    selected a radio
    button but didn't fill in the other area - I want the radio
    button they've
    already selected to be actually "selected" once the page
    reloads.
    Here is the series of radio buttons:
    <input type="radio" name="subject" id="subject1" value="1"
    />
    <label for="subject1" class="labelbold">I wish to
    contact you regarding
    website design</label><br />
    <input type="radio" name="subject" id="subject2" value="2"
    />
    <label for="subject2" class="labelbold">I wish to
    report a technical
    error</label><br />
    <input type="radio" name="subject" id="subject3" value="3"
    />
    <label for="subject3" class="labelbold">I wish to
    report an error with the
    copy</label><br />
    <input type="radio" name="subject" id="subject4" value="4"
    />
    <label for="subject4"
    class="labelbold">Other</label><br />
    This is how I'm validating my checkboxes:
    if($_POST['confirmbox'] == false) $error[] = "Check the
    Privacy Policy
    Agreement Box";
    However, using "false" doesn't seem to matter with the radio
    buttons. So,
    how can I get the radio buttons to validate that ONE was
    selected and how
    can I show that selected button on a page reload (I'm
    thinking I may need to
    dynamically generate the value=""....<?php...?>....?).
    Thanks!
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================

    Hello there -
    After no replies - I decided to strain my brain (ha-ha) - and
    finally
    figured out the solution to the problem.
    For the curious - I added this to each <input...>
    field:
    <?php if($_POST['subject'] == "1") echo'
    checked="checked"';?>
    And then for each <input...> I changed the "1" to the
    corresponding value
    each field was given.
    Have a wonderful night. :)
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "Shane H" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hey everyone -
    >
    > I'm trying to do two things here with an addition to one
    of my forms using
    > PHP.
    >
    > 1. Attempting to validate if one of the radio buttons
    has been selected.
    >
    > 2. Displaying which radio button is selected once the
    page is reloaded
    > (checking for validation errors). That is - if they've
    selected a radio
    > button but didn't fill in the other area - I want the
    radio button they've
    > already selected to be actually "selected" once the page
    reloads.
    >
    > Here is the series of radio buttons:
    >
    > <input type="radio" name="subject" id="subject1"
    value="1" />
    > <label for="subject1" class="labelbold">I wish to
    contact you regarding
    > website design</label><br />
    >
    > <input type="radio" name="subject" id="subject2"
    value="2" />
    > <label for="subject2" class="labelbold">I wish to
    report a technical
    > error</label><br />
    >
    > <input type="radio" name="subject" id="subject3"
    value="3" />
    > <label for="subject3" class="labelbold">I wish to
    report an error with the
    > copy</label><br />
    >
    > <input type="radio" name="subject" id="subject4"
    value="4" />
    > <label for="subject4"
    class="labelbold">Other</label><br />
    >
    > This is how I'm validating my checkboxes:
    >
    > if($_POST['confirmbox'] == false) $error[] = "Check the
    Privacy Policy
    > Agreement Box";
    >
    > However, using "false" doesn't seem to matter with the
    radio buttons. So,
    > how can I get the radio buttons to validate that ONE was
    selected and how
    > can I show that selected button on a page reload (I'm
    thinking I may need
    > to dynamically generate the
    value=""....<?php...?>....?).
    >
    > Thanks!
    >
    > --
    > Shane H
    > [email protected]
    >
    http://www.avenuedesigners.com
    >
    > =============================================
    > Proud GAWDS Member
    >
    http://www.gawds.org/showmember.php?memberid=1495
    >
    > Delivering accessible websites to all ...
    > =============================================
    >
    >
    >

  • Single form.. Insert records into multiple tables

    I have an unbound form that kicks off a process and I want to store the results of this process in the database. I can code this the old fashioned way with native jdbc calls, but was wondering if someone had a method for doing this with ADF BC.
    For example, the process will need to create:
    1 master record in table_a
    2 or more records in table_b
    2 or more records in table_c
    Thanks,
    Eric

    Hi,
    in ADF BC you would create a method e.g. on the AM level and then expose it as a client method to ADF. You can then - from within the method - access VO that are representing a table to create new records in them or - the old way - get access to the connection from the ApplicationModule and issue a prepared statement. It depends on the usecase and whether or not there exist a VO for the table to put in the data
    Frank

  • HCM Process and Forms - Create and End record using the same form scenario

    Hi All,
    I have the following requirement while using HCM Processes and Forms: Using one form/scenario I need to both create a record or be able to end a record for infotype 841. When looking at the back-end service SAP_PA I have operations Create, Change, Change without delimiting and Delete. My requirement would be to do both a create and a delete I guess, but these two can't be selected at the same time while configuring the form scenario.
    I was thinking about doing somethign with the startdate and enddate instead of using the effective date. But I have no clue how to do that.
    How would this be possible?
    Thanks,
    J

    You are correct in assuming that you cannot have a create and delete on the same infotype. The config will not allow it.  Instead, configure the create and then do the delete via a call to you own method in the workflow or via the advanced generic service
    Cheers
    Ian

  • How to select a item form listbox and insert it into combo

    i want to select a item from listbox and display it in combo ,how realize ?
    and how to insert a vi into a subpanel and excute?
    everyone's help will be appreciated 

    Hello,
    to add in Listbox selected item to Combobox see attached Vi. With the other part of our question must help someone other because I never did it.Message Edited by ceties on 10-18-2006 04:57 AM
    LV 2011, Win7
    Attachments:
    Insert.vi ‏20 KB

  • Re : Hw to create a table and insert records using procedures

    Hi..
    I tried to run a procedure to create tables but is givin an error message "insufficient previlages" and when i tried to run it using a anonymous block i can create the tables..so can any one help me to resolve this issue.
    Thanks in advance.
    balveer.

    You don't have the privilege on creating the procedures. Hence you are not able to create tables through procedures. where as you can create table from anonymous blocks..

Maybe you are looking for

  • Printing w/ Scale Width & Height Setting?

    With CS4 and CS5. When I put in a percentage in the Height Box and then Print the InDesign document, InDesign remembers the percentage. But when I put a percentage in the Width Box InDesign does not remember the number, ie, if I put in 98.52% it reve

  • Ipod cannot be updated all the way, WHY

    I have restored my ipod and gone throught beginning process with itunes and it updates for a while then it stops and says "Ipod Cannot be updated. The required folder cannot be found" Is it anti virus software? I am about to completely reinstall upda

  • Is there a way to allow "send to lab" export in lightroom?

    I would like to develop e plugin for my clients in lightroom. I need a plugin who let clients directly send photographs to my lab. For example in an ftp site. I've seen time ago something like that and i would like to do it for my lab. Is it quite po

  • Referencing Service Objects after FailOver

    I have a service object Manager1SO in partition1, that calls a Start method on another service object WorkerSO in partition3. Manager1SO then monitors WorkerSO by registering for the RemoteAccessEvent on WorkerSO. When partition2 is brought offline,

  • Motion files wont render properly via qmaster

    I have created animation in motion including some psd files. I have set up the render farm on two computers and its working just fine except one small issue. When the animation is being rendered(using compressor) on another computer the place where p