Php question: capturing data in a form  for mysql update

I'm trying to update my database by building a form that
links a city with surrounding towns. I want to enter the main town
and the surrounding towns and then it updates all records that
contain the main town. the code runs without errors, but the data
i'm entering is not finding its way into the variables and doesn't
update the database . . . all help appreciated.
<form id="form1" name="form1" method="get"
action="demograph_updatep2.php">
<label><strong class="innerpageheading">Main
town</strong>
<input name="maintown" type="text" id="maintown" />
</label>
<p><label><span
class="results_13px">Nearby Town1</span>
<input name="nearbytown1" type="text" id="nearbytown1"
/>
</label>
</p>
<p>
<label><span
class="results_13px">NearbyTown2</span>
<input name="nearbytown2" type="text" id="nearbytown2"
/>
</label>
</p>
<p>
<label><span
class="results_13px">NearbyTown3</span>
<input name="nearbytown3" type="text" id="nearbytown3"
/>
</label>
</p>
<p>
<label><span
class="results_13px">NearbyTown4</span>
<input name="nearbytown4" type="text" id="nearbytown4"
/>
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Update" />
</label>
</p>
</form>
<?php
// setting variables
$maincity = $_GET['maintown'];
$nearbycity1 = $_GET['nearbytown1'];
$nearbycity2 = $_GET['nearbytown2'];
$nearbycity3 = $_GET['nearbytown3'];
$nearbycity4 = $_GET['nearbytown4'];
mysql_connect (localhost,"");
mysql_select_db("") or die( "Unable to select database");
mysql_query("UPDATE physician
SET
physician_City2 = $nearbycity1
WHERE physician_City1 IN ($maincity)
mysql_close();
?>
<?php
mysql_connect (localhost,"");
mysql_select_db("") or die( "Unable to select database");
mysql_query("UPDATE physician
SET
physician_City2 = 'East Grand Rapids'
WHERE physician_City1 IN ('Grand Rapids')
mysql_close();
?>

please ignore the last ten lines: ?>
<?php
mysql_connect (localhost,"");
mysql_select_db("") or die( "Unable to select database");
mysql_query("UPDATE physician
SET
physician_City2 = 'East Grand Rapids'
WHERE physician_City1 IN ('Grand Rapids')
mysql_close();
?>
i was using those to test the sql code

Similar Messages

  • Capturing Data in a Form

    Hello everyone,
    Can someone please help and explain to me how to capture information from an Acrobat form that is emailed out?
    My understanding is that a form will be emailed out from Outlook as an attachment.  The data from that form is to be captured as it comes back into the network.  Now, is the form that is sent out a "stand alone" for lack of a better term, or is that form being hosted from a server somewhere?  I was told one way to capture this form was through a php or cgi script.
    I am technical guy with a strong desktop and server administration and support and network background.  I am not a strong scripter though and need to better understand the whole process before trying to implement a solution.
    Can anyone offer a good explaintion for me please?  There are bits and pieces to this puzzle and they are coming together so I can understand it logically and someone who can fill in the gaps would be much appreciated.
    Thank you,
    Jonathan

    George,
    My most recent responses begin with the "--".  Thanks for your help.
    To address your first question, the form can be set up to submit just the form data, either to a web server or to a recipient via email. So the form (PDF) is not submitted in this scenario. The user loads the form after getting it from a web server, via email, or some other way.
    --OK.  From how it was described to me the form will be sent out and received back as an email attachment.  How can "the form be set up to submit just the form data"?  Technology wise, what needs to be setup?  I understand scripting is involved and that script is delivered through a web server.  If this is all through email, how does traffic back and forth pass through a webserver for this script to run to extract the data dumping it into a .csv or .xlsx file?
    If the form is being served by a web server, it can either be loaded in the user's browser, or directly in Reader/Acrobat, depending on how the user's system is configured. It possible that a user may have a non-Adobe PDF viewer, that may or may not be capable of submitting the form. Reader/Acrobat is capable of submitting a form if it's being viewed in a browser or directly.
    --I understand easier how a form being served by a web server works from an infrastructure point of view.  Would the form ultimately reside on the webserver and in an email a link be sent out asking a user to go fill out this form and submit it or would the actual form go out in an email as an attachment?
    For your second question, it certainly is possible to set up the form to submit the form data to a CGI program on a web server. That's what I would recommend. The data could be stored any number of ways on the server. It could then be further processed so that the data is placed in a spreadsheet file if that's what's wanted. If you transfer the data files to a workstation that has Acrobat installed, it can convert a collection of data files to a CSV file, which can them be imported into Excel to create a spreadsheet.
    --George, I recognize your recommendation, but how is this set up?  Where on the webserver does the CGI script reside and how does it run on a submitted form?  We do want to capture the data in a spreadsheet.  That is our ultimate goal.
    So yes, a web server will be needed if you want to set up the form to submit to one. It does not require any Adobe software, and certainly not Acrobat, which is a desktop application for creating and modifying PDFs. Even if it might somehow be useful on a web server, such use is forbidden by the Acrobat license agreement.
    The web server can process the incoming data in any manner that's required. The particulars depend on the format of the incoming data (FDF, XFDF, "HTML", XML) and what you want to do with it (save the data files on the server, store them or the parsed data in a database, email the data files, etc.)
    --George, where do you classify the data format of the incoming data?  I am guessing in the CGI script?  I have a feeling that the FDF file format will be what we would be looking to setup.  We will definitely want to save the data files and save the data in a spreadsheet.
    Thank you again for your insight.
    Jonathan

  • GP - CAF : How to capture data from impersonalized form.

    Hi All,
              I have a requirement where in I have submit the data offline using an Adobe form and this data should be fed to an RFC any no if times.
    I have created a interactive callable object (Impersonalized form) using a form template. I'm able to download the form and submit any no of times.
    But the problem I have here is: I do not see any way to capture the data from the form and input it to the RFC. Please let me know if any of you have any ideas.
    Version: Netweaver 2004s SP15
    Thank you,
    Vasu Mullapudi

    I got the solution.
    GP Process in design mode have a tab Forms. Here, we can add the Interactive form callable object (Impersonalised form) and can map the fields to the process context.
    Thats it. Whenever you submit the form, the process is run with the form data and the job is done.
    Note: If the data is not sent to the process, try from the callable object in design mode -> Configuration tab.
    Here while selecting the Start process Upon completion, you have a option for mapping fields.
    Thank you,
    Vasu

  • Import data in to tables for MySQL, DB2 and others

    The documentation says that you can right click and select import data and import from a file. But apparently this doesn't work for MySQL, DB2 or other databases? Is that correct? There is no way to do mass data entry or editing of data?

    Correct. We're trying to help you move data from MySQL, DB2, or other (non-Oracle) databases TO Oracle.

  • File reporter questions - pulling data from db / files for o

    I've been trying to find a way to query or pull file and path info for volumes from the file reporter databases without needing to give access to the file reporter app. I have an outside group that I need to provide the file structure to, but don't need to give all of the info to, and need to provide it in the form of a text file. I could script this out, but if file reporter does this also, I don't see the point in duplicating the data out there.
    In reviewing the content of the sqlite databases it doesn't appear that the actual file system info. I see a lot of references to what I think may be files in the directory structure that the databases are located in. looking over the logs and debug files in these directories they look like they may contain what I am looking for, but I'm not sure what can be used to open or extract the data from them. Does anyone know what I would use to open or extract the zcf files located in them?
    so I've made a few attempts at trying to figure out the format these are in, but know they are not sqlite data... not zip or gzip... but definitely some sort of data file.

    On 10/8/2012 4:46 PM, rbgnr111 wrote:
    >
    > I've been trying to find a way to query or pull file and path info for
    > volumes from the file reporter databases without needing to give access
    > to the file reporter app. I have an outside group that I need to provide
    > the file structure to, but don't need to give all of the info to, and
    > need to provide it in the form of a text file. I could script this out,
    > but if file reporter does this also, I don't see the point in
    > duplicating the data out there.
    >
    > In reviewing the content of the sqlite databases it doesn't appear that
    > the actual file system info. I see a lot of references to what I think
    > may be files in the directory structure that the databases are located
    > in. looking over the logs and debug files in these directories they look
    > like they may contain what I am looking for, but I'm not sure what can
    > be used to open or extract the data from them. Does anyone know what I
    > would use to open or extract the zcf files located in them?
    > so I've made a few attempts at trying to figure out the format these
    > are in, but know they are not sqlite data... not zip or gzip... but
    > definitely some sort of data file.
    >
    >
    rbgnr111,
    It sounds like you might be better off exporting a report which suits
    your needs as a CSV file (which can be done from within File Reporter)
    and stripping out unnecessary 'columns' of metadata after the fact. This
    would be a great deal simpler than extracting the data from the database.
    - NFMS Support Team

  • Is it advisable to capture data through I/O for Balance sheet items

    Hi Experts
    Can you please advice is it normal practice to use Internal Orders for Balance sheet itmes since it is Cost Object
    Regards
    Sreenivasulu

    Hi Vijay
    Thanks for replying back
    I have requirement in my Project for capturing information for reporting purpose
    Basically i may use Internal Orders for only information capture nothing else
    is that advisable
    Regards
    Sreenivasulu

  • Capturing Data from forms before it is stored in the table

    Hi...I would like to capture data from a form before the data is stored in the database. that is, i would like to access whatever data is entered into a field right after the user pushes the Insert button. I would like to do some processing on the data and then store it in the table along with the data from the other fields. Is it possible to access it through a bind variable or something? Please tell me how to go about it. Thanks

    Hi,
    You can make of the session variables to access the values. Every field in the form has a corresponding session variable with the name "A_<VARIABLE_NAME>". For example for deptno the session variable will be "A_DEPTNO"
    Here is a sample.
    declare
    flightno number;
    ticketno varchar2(30);
    tdate date;
    persons number;
    blk varchar2(10) := 'DEFAULT';
    begin
    flightno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    ticketno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_TICKET_NO');
    tdate := p_session.get_value_as_date(
    p_block_name => blk,
    p_attribute_name => 'A_TRAVEL_DATE');
    persons := p_session.get_value_as_number(
    p_block_name => blk,
    p_attribute_name => 'A_NOF_PERSONS');
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHTNO',
    p_value => to_char(NULL)
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_TICKETNO',
    p_value => to_char(NULL)
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_TRAVEL_DATE',
    p_value => to_char(NULL)
    end;
    In the above example the values of the variables are got into temporary variables and session variabels are set to null.
    Thanks,
    Sharmil

  • Date format on form submit

    After setting up the date formats with the developer toolbox, the help instructs you to insert KT_formatDate($row_rsRecordset['name_emp']) into your pages. This works great for displaying data, however I can't find what to do to fix the date format upon submitting a form. I am using the Insert Record server behavior and assume the KT_formatDate needs to be added there, but no matter where I put it it doesn't seem to work. Any ideas?

    Hi Megan,
    ADDT provides a variety of so-called "dynamic data" placeholders which can be used when inserting/updating records. In your case the placeholders in question are...
    {NOW} for MySQL date columns
    {NOW_DT} for MysQL datetime columns
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Adadmin can't compile forms for po ,gl  in 11i

    Hi All ,
    I tried to do mass compile of forms through adadmin for all object in 11i apps but have noticed only fnd forms fmx are able to generate.
    Other product like po ,gl forms(fmx) not generated .
    I have tried to compile forms for po or gl but getting below message. Any idea ?
    EBS - 11.5.10.2 (Linux 5)
    Database - 11gR2 ( AIX 6)
    Do you want to generate Oracle Forms objects
    using this character set [Yes] ?
    Do you want to regenerate Oracle Forms PL/SQL library files [Yes] ?
    D you want to regenerate Oracle Forms menu files [Yes] ?
    Do you want to regenerate Oracle Forms executable files [Yes] ?
    *Enter list of products ('all' for all products) [all] : po*
    Generate specific forms objects for each selected product [No] ?
    The current set of installed languages is: US
    Please select languages for generating Oracle Forms files.
    You may select all of the above languages, or just a subset.
    Enter list of languages ('all' for all of the above) [all] :
    You selected the following languages: US
    Is this the correct set of languages [Yes] ?
    Reading product form information...
    Selecting Oracle Forms PL/SQL library files and menu files to generate...
    Selecting product forms to generate...
    No Oracle Forms objects selected for generation.

    user10922685 wrote:
    Hi All ,
    I tried to do mass compile of forms through adadmin for all object in 11i apps but have noticed only fnd forms fmx are able to generate.
    Other product like po ,gl forms(fmx) not generated .
    I have tried to compile forms for po or gl but getting below message. Any idea ?
    EBS - 11.5.10.2 (Linux 5)
    Database - 11gR2 ( AIX 6)
    Do you want to generate Oracle Forms objects
    using this character set [Yes] ?
    Do you want to regenerate Oracle Forms PL/SQL library files [Yes] ?
    D you want to regenerate Oracle Forms menu files [Yes] ?
    Do you want to regenerate Oracle Forms executable files [Yes] ?
    *Enter list of products ('all' for all products) [all] : po*
    Generate specific forms objects for each selected product [No] ?Choose yes to this question, it will regenerate all forms for the selected module
    The current set of installed languages is: US
    Please select languages for generating Oracle Forms files.
    You may select all of the above languages, or just a subset.
    Enter list of languages ('all' for all of the above) [all] :
    You selected the following languages: US
    Is this the correct set of languages [Yes] ?
    Reading product form information...
    Selecting Oracle Forms PL/SQL library files and menu files to generate...
    Selecting product forms to generate...
    No Oracle Forms objects selected for generation.
    Further info, refer MOS Note:
    How to Generate a Specific Form Through AD utility adadmin [ID 178722.1]

  • Pass/retrieve data to PDF form using php

    Hi
    We are trying to build an application that goes like this. 
    Web based application.  Document template is uploaded.  User can open the template, fill in data, and save the form.  PHP , Mysql
    We are stuck at the stage where we need to pass some data via php into the form and then extract the filled in data from the form via php.
    Does anyone have a solution to this.
    Thanks
    Sam
    zhhealthcare

    Try googling "iText".
    iText is JAVA based, and is capable of creating and manipulating FDF data.
    For a Microsoft .net version, check out "iTextSharp", or "FDFToolkit.net"
    Hope this helps...

  • My form has a list of yes or no questions.  I want to use either cheboxes or radio buttons.  I can't make it work.  When I check yes for one question, it marks all yes answers for all other questions.  If I mark some radio buttons to answer, it unmarks la

    My form has a list of yes or no questions.  I want to use either cheboxes or radio buttons.  Unfortunatly I can't make it work.  When I check yes for one question, it marks all yes answers for all other questions.  If I mark some radio buttons to answer, it unmarks later.  Need immediate help!!!

    Is it that you are using a PDF-based form? Did you copy and paste the Yes/No fields all the way down your form? If so, then all of the yes/no boxes are copies of each other and have the same name and properties in the PDF.
    For example, if you had:
         Question 1 and Question 1 Yes/No checkboxes
         Question 2 and Question 1 Yes/No checkboxes
         Question 3 and Question 1 Yes/No checkboxes
         Question 4 and Question 1 Yes/No checkboxes
    Then whatever answer you selected in Question 1 would populate down through the rest of the form.
    Changing the Yes/No field properties in questions two through four would eliminate the problem.
    I hope that helps,
    Brian

  • How do I update Date Time Digitized to match an updated Capture Time for a DNG file?

    I am updating capture time based on GPS Time (a bit OCD, I know) but when I change Capture Time the Date Time Digitized value does not change. This in in LR 4.3 and is not affected by whether on not the Catalog is set to 'Write date or time changes into proprietary raw files'. Maybe this is a problem for DNG files only.

    GreSep wrote: I saw another LR discussion that said that with LR 4.3 updating Capture Time would also update Date Time Digitized but it does not do so for me on my DNGs (and as of last month ALL my images were converted to DNGs).
    One or two intermediate versions of LR 3 (perhaps Lr 3.6) set DateTimeDigitized when you gave the Metadata > Edit Capture Time command. But for people managing scans in which the capture time of the original image was different than the scan time, this behavior overwrote their scan times, so Adobe backed out of that change.  Before and since those versions, the Metadata > Edit Capture Time command just changes the EXIF:DateTimeOriginal and related fields in XMP and IPTC.

  • Using interactive form to capture data from user u0096 please helpu0085.

    Hi folks,
         I am trying to use an interactive form to capture some data from the user.
    This is what I have planned to do
    User runs a program which will have four function module calls
    (FP_JOB_OPEN
    FP_FUNCTION_MODULE_NAME
    'Function modules which the above function module returned'
    FP_JOB_CLOSE)
    This will display a print box where I can click on the print preview to get the interactive form.
    From here I am not sure how to go about, but following is what I can think …
    Once the user enters the data in the form and he should be given some button to click(say ‘save’). This button click should trigger the program (PAI) which will read the data from the form (this data will be saved to a Z table)..
    First of all, Can I do this? Please guide…
    Note: I am not using WebDynpro ABAP or JAVA. Rather I am trying to use a Module pool + interactive form solution.
    Thanks in advance

    could you tell me how to read data from the form ? which function module(s) to be used ?

  • Custom tabular form for multi-row not saving data

    Ok, before anyone asks, yes, I did read the how-to:-)
    I have a custom tabular form, which I did cause I need to use popups and the popups that you can use in the wizard tabular form does not display the text but rather the value underneath it.
    It returns data rather nicely and when I go and update values I can tell it is changing the fields underneath. I put a process in that will display the values in text fields on the form (for one row only) and I see them changing from what is already there and with the proper values.
    However, when I do that the data that is displayed then gets reverted back to what it was previous to the update but reports that the process was successful.
    I have also tried to insert but that is basically doing the same thing. Can anyone guide me.
    SQL to generate the tablular form...
    SELECT x.sak_release_db
    , x.sak_object
    , x.sak_release
    , x.sak_participant
    , x.sak_csr
    FROM
    (SELECT htmldb_item.hidden(1,sak_release_db) sak_release_db
    , htmldb_item.popupkey_from_query(2, sak_object,
    'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
    FROM system_object a
    , database_table b
    WHERE a.sak_object = b.sak_object') as sak_object
    , htmldb_item.hidden(4,sak_release) sak_release
    , htmldb_item.popupkey_from_query(5, sak_participant,
    'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
    , htmldb_item.popupkey_from_query(7, sak_csr,
    'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
    FROM release_db_xref
    UNION ALL
    SELECT htmldb_item.hidden(1,NULL) sak_release_db
    , htmldb_item.popupkey_from_query(2, NULL,
    'SELECT b.nam_schema||''.''||a.nam_technical as table_name , b.sak_object
    FROM system_object a
    , database_table b
    WHERE a.sak_object = b.sak_object') as sak_object
    , htmldb_item.hidden(4,NULL) sak_release
    , htmldb_item.popupkey_from_query(5, NULL,
    'SELECT nam_first || '' '' || nam_last as name, sak_participant FROM co_participant') sak_participant
    , htmldb_item.popupkey_from_query(7, NULL,
    'SELECT external_id|| ''-''||id_split as co, sak_csr FROM co') sak_csr
    FROM dual) x
    Process to verify that I have the correct global fields: (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations)
    begin
    :P3_2 := replace(htmldb_application.g_f02(1),'%'||'null%',NULL);
    :P3_5 := replace(htmldb_application.g_f05(1),'%'||'null%',NULL);
    :P3_7 := replace(htmldb_application.g_f07(1),'%'||'null%',NULL);
    end;
    Process to do the insert/update. Note, I hardcoded the value in the where clause but I was originally using the global value for g_f01 (i also tried putting a commit in there for fun) (Type: PL/SQL anonymous block, Process Point: On Submit - After Computations and Validations):
    -- Update the RELEASE_DB_XREF table
    FOR i IN 1..htmldb_application.g_f01.count
    LOOP
    IF htmldb_application.g_f01(i) IS NOT NULL THEN
    UPDATE release_db_xref
    SET sak_object = replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    , sak_participant = replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    , sak_csr = replace(htmldb_application.g_f07(i),'%'||'null%',NULL)
    WHERE sak_release_db = 22;
    ELSE
    IF htmldb_application.g_f02(i) IS NOT NULL THEN
    INSERT INTO release_db_xref
    (sak_object
    ,sak_release
    ,sak_participant
    ,sak_csr)
    VALUES
    (replace(htmldb_application.g_f02(i),'%'||'null%',NULL)
    ,htmldb_application.g_f04(i)
    ,replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    ,replace(htmldb_application.g_f07(i),'%'||'null%',NULL));
    END IF;
    END IF;
    END LOOP;

    Florian,
    Checkboxes are different from other HTML form items. When you have a text box for example, there's always a value send to the server when submitting. Even if that value is NULL. When you have a checkbox however, you only get the value if the checkbox is checked. It's not posted to the server when it is not checked. That's the general behavior of HTML forms and not specific to Oracle HTML DB.
    When working with tabular forms in HTML DB, you can access your form values using the htmldb_application.g_f0x arrays. Now if you have for example 10 rows in your form, then you'll get ten elements in your array for text boxes, select lists, etc. For checkboxes however you'll only get as many elements as you have rows checked. If I read your update and insert code correctly, you're trying to use the checkbox arrays the same way you use the arrays based on other item types. My recommendation would be to use Yes/No select lists instead of checkboxes or at least use select lists initially to get it working and then work on properly processing the checkboxes.
    Some general information about working with checkboxes in tabuar forms can be found here:
    http://www.oracle.com/technology/products/database/htmldb/howtos/checkbox.html#CHECKBOX_IN_REPORT
    Hope this helps,
    Marc

  • Question about data extraction from web forms

    I am developing a simple web form in DreamWeaver MX for
    increased accesibility for users who utilize screen reader
    software, as navigating PDF forms is still currently very difficult
    for most of the screen readers to navigate. I was wondering if
    there is a way to take an .asp webform that a user fills out and
    when they hit a print button it would extract the data from the
    form and open an Adobe PDF form and populate the data they entered
    into specific fields within the PDF form which would allow them to
    print an official copy of the form they used the web version to
    complete. Any insight into this possibility is greatly appreciated!
    Thanks,
    AU PSD

    Regex? Lots of indexOf? Parsing...

Maybe you are looking for

  • How to deactivate a serial number of Acrobat on a damaged PC?

    Hi, after a harddrive crash I cannot boot my old PC anymore. How can I deactivate the serial number of Acrobat in order to re-install it on a new PC? Is there any customer service email adress of Adobe for such a request?

  • Digital Inputs do not record over long time periods

    I am running Signals Express 2009 with a USB-6009.  I have a project that needs to record the states of 8 digital inputs over a 24 hour period.  The inputs typically do not change state for long periods of time.  When I run the project it does record

  • Blog entry in iWeb via e-mail?

    Hello, I have an iWeb blog on MobileMe and wondering if it is possible to add blog entries via e-mail? (This feature would be very handy if one is away from his Mac...) Thanks, Attila

  • Secure PDF from Crystal Reports

    What's the best way to secure a .pdf from Crystal Reports? I'm using reportdocument.exporttostream(ExportFormatType.PortableDocFormat) in vb.net(VS2005) to create an IO.MemoryStream which is then sent via email. I'd like to add a password to this fil

  • Canon EOS 50D

    Just announced by Canon, the EOS50D. Relevance to this forum? US pricing in dollars is the same as price in euros, so yet another rip-off for loyal EU customers!