Is this possible using php and insert record?

Hi I have a table to insert record named CV
If I leave the choice of the CV, for example temp, international, student etc., can I do some fields not available or available depending on the choice of the CV. Why I need is that if the choice is temp user chooses their rate of pay, the others won't. It is a single difference there will be a few other institutions. I wonder if I can use a conditional statement with the insert record or will I need to put in place a variety of tables of CV in the database?
Thanks I hope you can help I am new to this.

jjjhbj111 wrote:
> Hi David
> Thank you for the great response. I'd put the code of adaptation before inserting registration data or after?

The following code is from a real insert record server behavior:

If ((isset($_POST["MM_insert"])) & ($_POST ["MM_insert"] ==))
"insertAuthor')) {}
$insertSQL = sprintf ("INSERT INTO authors (name, family_name)
VALUES (%s, %s) ',)
GetSQLValueString ($_POST ['name'], "text").
GetSQLValueString ($_POST ['family_name'], "text"));

The conditional statement must wrap the definition of $insertSQL. You
you will need to create your own definition for $insertSQL for each scenario. For
example, you might adapt this option to create different insert orders
If a middle name is supplied in function:

If ((isset($_POST["MM_insert"])) & ($_POST ["MM_insert"] ==))
"insertAuthor')) {}
If ($_POST ["middle_name"]! = "") {}
$insertSQL = sprintf ("INSERT INTO authors (name, middle_name,
Family_name VALUES) (%s, %s, %s) ',)
GetSQLValueString ($_POST ['name'], "text").
GetSQLValueString ($_POST ['middle_name'], "text").
GetSQLValueString ($_POST ['family_name'], "text"));
}
else {}
$insertSQL = sprintf ("INSERT INTO authors (name, family_name)
VALUES (%s, %s) ',)
GetSQLValueString ($_POST ['name'], "text").
GetSQLValueString ($_POST ['family_name'], "text"));
}

--
David powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/

Tags: Dreamweaver

Similar Questions

  • PHP and Insert Records form validation

    Hello

    I've been scratching my head for 2 days and could not find a solution.

    Here's my problem:

    Go to http://ecopethandbags.com/contactTest.php and click on the "Send comments" button.

    You will see the validation works.

    Go in http://ecopethandbags.com/contactTestInsert.php , this time, I inserted the server behavior "Insert record".

    Click again on the send comments"" button.

    You will see the naughty message as "'firstname' column cannot be null" in a simple white page.

    My question is:

    How can I insert the form PHP records in my database and take advantage of validation of form as well in http://ecopethandbags.com/contactTest.php

    I enclose files.

    Thank you very much for your help!

    boloco wrote:

    My question is:

    How can I insert records in the form of PHP in my database and enjoy beautifully like form validation in http://ecopethandbags.com/contactTest.php

    Use a simple PHP logic to merge the scripts.

    Dreamweaver automatically updates the server behavior code insert a record into the upper part of the script. You have to adapt so that the validation is done first. If the validation is successful, use the server behavior insert record. If not, display the form again.

    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
        }
      }
    }
    
  • How to insert image from mysql into the table using php and create the checkbox in the table?

    How can I insert image from mysql into the table using php and create the checkbox for each data as a vote? Here is my code...

    WELCOME

    connect_error) {die ("connection failed:".)} $conn-> connect_error); } $sql = "SELECT no, Calon, ID, of course, the Image OF THE candidates." $result = $conn-> Query; If ($resultat-> num_rows > 0) {echo ' '; export data of each line while ($row = $result-> fetch_assoc()) {"echo"}}
    NO Candidate INFO Vote
    " . $row ["no"]. "-" . $row ["Calon"]. "
    -" . $row ['ID']. "
    -" . $row ['class']. "
    "; } ECHO ' ' ;} else {echo '0 results' ;} $conn-> close();?} >

    hope someone can help me because I am a newbie in this program... need to finish this project... Thank you.

    If you have saved the file name in the database, it's pretty simple.

    echo '' . $row['description'] . '';
    

    Is the same for the box:

    echo '';
    

    If you have saved the image file in the database, it is much more complicated. I recommend you store only the file name in the database.

  • Sites Web using php and mysql successfully stopped the week last of sorting drop-down lists. Change something?

    We run a programme of internal timesheet open source called Timesheet Next Gen available on Sourceforge. We have it worked for a few years without any problems. We moved all of our Firefox users because the developer has indicated that there are questions of the sort associated with PHP and MYSQL via Internet Explorer. Dropdown lists using surveyed data did not follow the order of sorting and list have been blurred without order with duplicate entries. We had experienced this on our Windows 7 workstations in Internet Explorer (any version) and everything worked fine in Firefox. For some of us with the MacBook, the sort worked well in Firefox and Safari.

    Departure last week (perhaps Tuesday or Wednesday) all our users to Workstation Windows 7 has started to have the same sorting problems in Firefox with our internal website of timesheet. There is no change for timesheet Web site or the server that is running as much as php and server extensions web apache. I've since updated the server (Ubuntu) and apache, mysql and php are underway. Now sort in Firefox has stop working on our mac workstations. Safari is the only browser that works. We have installed Chrome on mac and Windows 7 and it does not sort either.

    To wrap to the top of this thread, the solution is available here: http://sourceforge.net/p/tsheetx/discussion/779084/thread/02841540/

    The general idea behind that the solution can be applied to other projects where a JavaScript object is created in PHP and you need access to its members in order of addition.

  • A gallery of fluid from MySQL using PHP and various column widths

    I decided to try the new option of fluid page layout in Dreamweaver. I pull information from a (MySQL) database and use php to present.

    To view a gallery, I pull the info and use repetition code and something as horizontal repeat of Tom Muck script to create a gallery. Images should be indicated with other text information (not only a legend). However, the script of HR is a fixed amount of columns - and I want the number of columns to change depending on the width of the browser.

    So it's more than a gallery - pulling images from a database with title = 'x' would be a stylized DIV repeated with multiple fields of texts and styles to the breast.

    For example, a site of car dealer that it must show the image of car, price, year, description etc all fonts of different style so it may just be a legend in the image.

    If the options are:

    A fixed number of columns for each width: Mobile Monitor, 5, 3 shelves, 1. This can be done by having an "IF" statement in the code, if width = x use this version of the horizontal repetition?

    A fluid version which has 6 columns and do you drag the width of the browser, you can see the Gallery less than column width until it reaches 1 for mobile.

    The fluid version would be better.

    Any link to a tutorial or an example would be most appreciated.

    Thank you very much

    HVR

    The only problem with the use of instead of a table to create columns of the grid is that you need to set a minimum height on the to keep them all at the same depth, a bit like a construction of table cell looks and behaves. If you do not set a minimum height that the grid will look all shredded MORE the very big disadvantage is that the will not clear if another

    has more content in there that's going to happen if you include a 'description' of the car because it will never be the same length unless you are prepeared to edit the text.

    See sample of fluid below: you can simply fill in the of your database and the loop through them

    Untitled document

    Price

    £8500

    Year

    2009

    Description

    This is a description of the car

    Price

    £8500

    Year

    2009

    Description

    This is a description of the car

    Price

    £8500

    Year

    2009

    Description

    It is a description of the car. It is a description of the car. It is a description of the car.

    Price

    £8500

    Year

    2009

    Description

    This is a description of the car

    Price

    £8500

    Year

    2009

    Description

    This is a description of the car

  • Muse has the possibility to use php and mysql?

    I'm really digging muse but I cannot find where or if the muse can include the type of code to interact with mysql via php... Thank you.

    HTML, CSS and Javascript only at this time.

  • Is this possible using calendar (Windows Live Mail) on Dell Streak 7 Tablet?

    I am using Windows 7 on my laptop and my email is Windows Live Mail.  I use the calendar with Windows Live Mail.  I would use this calendar on my Dell Streak 7 Tablet instead of keeping two different calendars.  Is it possible or can suggest you something easy to do for me (I'm old).  I get my email on

    the table ok I'm going in my cable server.

    Thanks, Cobina1

    Your Tablet works with Windows?  Windows Live Mail is for Windows computers.  If the Tablet is using Android as do most non-Apple tablets, you cannot use Windows Live Mail.  There are a lot of calendars Android you can use however.

    Good luck.

  • Is this Possible using ODI / ODQ?

    Hi all

    Is below possible requirement with ODI / ODQ?
    (now I do it manually and it's like a process monthly/weekly)

    If we can do the same thing using ODQ how I need to start and move forward?

    My requirement is something like that. I have two columns

    Address1 (mailing address)
    Address2 (additional information)

    In some cases the address isn't in the right format. So I need to do some data cleaning (washing) before loading with ODI

    If address2 Address1 is C.p., building name or any info other than a street address. The only address column is necessary in the output (Address1)

    For example:

    ENTRY

    -----

    ADDRESS1 - ADDRESS2

    -----

    HIGHWAY #---5010944 MARSH RD
    PO BOX 40964 - 1100 AA CORP PARKWAY
    S/N VANTAGE PP - 11031 PERRY HIGHWAY
    HOME - 11031 PERRY HIGHWAY INFUSION THERAPY SERVICES
    7275 BUFFALO ROAD-(6855 BUFFALO ROAD WAS)
    7601 N FEDERAL HWY - #2506
    MCAS-(MARINE CORPS AIR STATION)
    BRADDOCK AVENUE 212-
    212 NINTH STREET-
    2138 JONATHON DRIVE-

    -----

    OUTPUT (Note: we don & rsquo; t need the address2 column in the output)

    -----

    ADDRESS1 - ADDRESS2

    -----

    10944 MARSH RD - 10944 MARSH RD
    1100, PROMENADE OF THE AA - 1100 AA CORP PARKWAY CORP.
    11031 PERRY - 11031 PERRY HIGHWAY
    11031 PERRY - 11031 PERRY HIGHWAY
    7275 BUFFALO ROAD-(6855 BUFFALO ROAD WAS)
    7601 N FEDERAL HWY - #2506
    MCAS-(MARINE CORPS AIR STATION)
    BRADDOCK AVENUE 212-
    212 NINTH STREET-
    2138 JONATHON DRIVE-

    -----


    I posted a similar question in the forum of the quality of the DATA (ODQ)
    Home forum & raquo; Master Data Management (MDM) & raquo; Quality of the data

    ADDRESSING the ODQ HELP CLEANING (US)
    Discussion: ADDRESS CLEANING (US) with the HELP of ODQ

    If any body working on address cleaning using ODQ, please guide me to start working on it.


    Are there specific documents to ADDRESS that gives more information about the flow of processes such as CLEANING
    Transformer, monitor customer data, Postal sorting Matcher, Matcher Postal, key generator window, sort to link, Linker, Commonizer and Reconstructor data relationship.




    Thanks in advance,

    Its

    Hi Alex,

    I was building the java code, but I had another idea to make easier.

    (1) load the values into a temporary table with a column for each address (means 2 columns per line) 2 other columns to the control.

    Something like:

    table temp_data
    columns: add_1, control_1, add_2, control_2

    You can make it through an interface. Leave the fields 'control' worthless loading

    (2) create a table to store the values that you have sent to me (Avenue, street...)

    table street_names
    columns: street_name, country (for future use)

    (3) create an ODI procedure (or you can customize a KM with the same technical)

    3.1) step 1 on the target tab, javaScript technology
    Code:

    <@String vu=" " ;@="">

    3.2.1) step 2 - Source - technology 'your database' tab and the logic diagram where the "street_names" table created

    Select street_name
    of street_names
    WHERE country = "US".

    3.2.2) step 3 - target - tecnology javaScript tab

    <@vU+="or instr(upper(add_1),upper('#street_name'))="">0 ";@>

    3.3) step 3 - target - technology 'your database' tab and the logic diagram where the "temp_data" table created

    <@vU=vU.substring(3);@>
    Update temp_data
    Set control_1 = 'Y '.
    where<@=vU@>

    3.4) step 4 step 3 - target - technology 'your database' tab and the logic diagram where the "temp_data" table created

    <@vU=vU.replaceAll("add_1","add_2")@>
    Update temp_data
    Set control_2 = 'Y '.
    where<@=vU@>

    (4) now, you have a table (temp_data) with a flag 'Y' where there is a street where the name and 'null' does not exist. Just build your file by an interface or an odiSqlUnload free of charge.
    Put them all together in a package, and you'll have your process.

    I have create this way to minimize access to the insert_table, just 2 updates.
    can be used some alternatives of tunning the hole process if the time is not what you need.

    This is a quick fix. Something more elaborate can be done if necessary.

    This help you?

    Cezar Santos

  • Is this possible with photshop and 13mpx mobile phone camera?

    Is it possible with the phone mobile camera 13mpx and photshop make image look pro like that? TNX in advance

    http://s1.postimg.org/ta3np201r/MV5_BOTc0_ODk3_Mzg4_OF5_BMl5_Ban_Bn_Xk_Ft_ZTcw_Mz_Iy_Nzgz _ OQ.jpg

    And here's one to correct color and tone.

    many https://helpx.adobe.com/Photoshop/How-to/Color-Tone-Adjustments.html?Set=Photoshop--Fundam image adjustment-

    You can find a lot of Photoshop tutorials from the forums home page. Find 'Adobe learning' in the second list box on the right, then click on the Go button.

  • Is this possible using distorting of Illustrator?

    Just try to reproduce the veiled effect type "rockett. Looks like a relatively simple effect, but can't seem to find a way to do it in illustrator. What Miss me?

    Screen Shot 2014-03-07 at 12.16.15 pm.png

    Deformation of the envelope > make with Warp > Arc lower [-25 setting horizontally more or less].

  • Inserting record in the database and then display on the next Page

    Hello!

    For a while since I posted here, but I've been pulling my hair out on this one.  Here's what I want to do.  I have a page that I want to be able to enter text in two form fields, then click on "Insert disc", and then on the next page, I just submit display.  For example, on the "insert.php" page I want to enter the field ID and Joe 43569 in the first name field.  Then after I click on submit (or insert record) the next page will have a text that says: "congratulations Joe, your ID is 43569.»  Have a great day! "Or something to that effect.

    I have the database mySQL, set up and insert records into it since this page works correctly.  Here is the code of my insert.php page which I think is the issue.   I'm just confused as to which should be added to the page detail.php to have this sentence appears correctly.  Is there something that should be added to the code on the page insert.php?  Something after the detail.php on that first line?

    Thank you, thank you, thank you in advance.

    Brent

    $insertGoTo = 'detail.php ';
    If (isset {}
    $insertGoTo. = (strpos ($insertGoTo, '?'))? « & » : « ? » ;
    $insertGoTo. = $_SERVER ['QUERY_STRING'];
    }
    header (sprintf ("location: %s", $insertGoTo));
    }
    ? > <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    " < html xmlns =" http://www.w3.org/1999/xhtml ">
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"
    < title > Untitled Document < /title >
    < / head >

    < body >
    < do action = "<?" PHP echo $editFormAction;? ">" method = "post" name = "form1" id = "form1" >
    < table align = "center" >
    < tr valign = 'of basic">
    < td nowrap = "nowrap" align = "right" > ID: < table >
    < td > < input type = "text" name = "ID" value = "" size = "32" / > < table > "
    < /tr >
    < tr valign = 'of basic">
    < td nowrap = "nowrap" align = "right" > first name: < table >
    < td > < input type = "text" name = "lastName" value = "" size = "32" / > < table > "
    < /tr >
    < tr valign = 'of basic">
    < td nowrap = "nowrap" align = "right" > < table >
    < td > < input type = "submit" value = "Insert file" / > < table >
    < /tr >
    < /table >
    < input type = "hidden" name = "MM_insert" value = "form1" / >

    < / make >

    When you submit the form, the form fields values are passed to the query insert as variables of $_POST, but as soon as you redirect the user to another page, these variables are destroyed.

    There are two ways to preserve the values: use sessions and session variables, or add values to the end of the redirect URL query string. Using the variables of session is probably easier since you can do it at the top of the page that inserts data into the database without affecting the code of Dreamweaver Server behavior.

    Put this at the top of the current page:

    
    

    In details.php, add top of the page. You can then use $_SESSION ['ID'] and $_SESSION ['name'] to display the values.

  • Tabular - submit custom and insert/updated data in records

    I have a tabular layout with 2 columns representing the data in the table and custom 5 columns.

    The task ID Name of the task 07/10/2013-10 13, 2013 14/10/2013 to 20/10/2013 21/10/2013-10 27, 2013 28/10/2013-03/11/2013 11 04, 2013 at 10/11/2013
    1TASK1
    2TASK2
    3TASK3

    I use a sql that returns null for columns 3 to 7 values. Can I use the html form of the apex option and jquery to add change the headers for weeks and add checkboxes.

    My sql: select task_id, TaskName, null, null, semaine2, null, null semaine4 semaine3 week1, week5 < table name > null

    My table has columns task id, task name, start_date and end_date.

    When the user clicks on the button submit, I need to send the box to my stored procedure and insert records into the table. I can't find out how to send a mapping of the task_id, date in each column headers and data box at the apex back end and treat them. For example, if the first check box in the first row is checked, I have to insert a row with the values "1, TASK1, 07/10/2013, 13/10/2013. I have also read data from the table and display it in the same format. Please let me know how to proceed in the apex.

    instead of using the null value, you can use apex_item api to create checkboxes

    read http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CHDDCHAF

    You can set the value of checkboxes using apex_item api, then the value may be captured in your process of

    Check this: Martin Giffy D'Souza on Oracle APEX: APEX (Advanced) with checkboxes report.

    Let me know if that answers your query in the active thread

    Kind regards

    Vishal

    Oracle APEX 4.2 reports | Packt Publishing

    Vishal blog

  • Captivate 6 - using ppt and shooting of a program for a presentation

    Hello

    Is it possible to start the presentation with power point and film and a computer program? I want to switch between the 2.

    Thank you

    Erin

    Import the powerpoint and insert recording slides, if you want to use the automatic or manual capture process. If you want to use the video demo, it is possible with the same insert, slides in the recording.

    Lilybiri

  • set up, log in using PHP

    I'm trying to put in place a log in page (Dw CS5.5) to add a list of members, visible only to logged in members on my site. In the server behaviors panel, I got 1. create a site and 2. Choose the document type, but can not get 3. set up the server to test the site for you sign up. I think that I did everything she asked. I am very confused at this point and would like if someone could lead me through the main steps to put in place a log in page. I have used WAMP, but so far had no success. I think I must be missing a step.  I'm still a rookie using Dw so please keep it as simple as possible. Or - Is there a tutorial that would lead me through it? I could not find one. I want to use PHP and not ColdFusion.Thanks for any help.

    I found a very good tutorial on lynda.com Dreamweaver CS5 and PHP, and MySLQ with David Gassner. He answers my questions in a very logical and understandable way.

  • How to navigate through a recordset using PHP

    I have a recordset containing a MySql table with 5 columns, each containing an email address of a staff member in a club.

    Each line represents a different club and each column a different type of agent.

    The first column represents presidents, treasurers next etc...

    The recordset is called $mailset.

    I need to loop through each row in $mailset and extract the email addresses of each column and concatenate them into a string separated by semicolons semi so it ends like this:

    [email protected] ; [email protected] ; [email protected] ; and so on.

    This is how the recordset is implemented:

    @mysql_select_db ($database_dummyread, $dummyread);

    $query_mailset = "SELECT club_chair_email, club_treas_email, club_sec_email, club_delegate_email, club_deputy_email FROM clubs;

    $mailset = mysql_query ($query_mailset, $dummyread) or die (mysql_error ());

    $row_mailset = mysql_fetch_assoc ($mailset);

    $totalRows_mailset = mysql_num_rows ($mailset);

    ? >

    I tried to use a loop to iterate through the Recordset, but it always shows the first record, so its not to move the pointer in the file.

    The pseudo code of the punishment to be something like this:

    Initialize variables and move to the first record

    If the registration process

    Read a record

    Treat all columns

    Move to the next record

    on the other

    If there is no record

    print an error message

    on the other

    Print the results.

    Can someone give me a hint on how to move from one line to the other in a recordeset under the control of a loop.

    I use PHP and MySql. (as far as I know, this is the original - not AOP or MySqli)



    While ($mail = {mysql_fetch_assoc ($mail_seyt))}

    extract ($mail);

    echo "$club_chair_email - $club_treas_email".
    ";

    }

    That should put you on the right track.

Maybe you are looking for