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.

Tags: Dreamweaver

Similar Questions

  • He had to go second record on the next page

    Hello

    I develop a report and this report has two groups. Header group and the Group of lines,

    Group of lines repeated lines.the problem is that each line is considered to be a material the table first and for example, the second raw takes 8 lines that do not fit on the first page.

    what I have to do is to calculate the number of lines in the page and the number of lines so that raw and if the number of lines of position gross + current of the first line in this higher than total gross lines per page can move entire flood to the next page.

    at the bottom if the details of a line from a point of overflow on the next page, rather leave the details on the new page

    Thank you
    Ramez

    You must select the repeating line, click with the right button-> the properties of the Table-> uncheck "allow splitting of lines on several pages.

  • Whenever I start Firefox, my home page is displayed, and then another tab of a page I looked at in the past. I don't know how to do stop loading up this extra page on start up. Suggestions? Thank you!

    Whenever I start Firefox, my home page is displayed, and then another tab of a page I looked at in the past. I don't know how to do stop to load to the top of this additional page at startup and can't seem to find information on how to disable this junk page. Any suggestions? Thank you!!

    Maybe you inadvertently set both pages to be your Homepage"(s)"?

    See How to set the home page

  • AFTER TWO MINUTES OF INACTIVITY, I AM BACK TO WHERE I LOG IN AS A USER AND ENTER MY PASSWORD AND THEN TAKES ME TO ANY PAGE OF THE APP I WAS USING

    AFTER TWO MINUTES OF INACTIVITY, I AM BACK TO WHERE I LOG IN AS A USER AND ENTER MY PASSWORD AND THEN TAKES ME TO ANY PAGE OF THE APP I WAS USING

    AFTER TWO MINUTES OF INACTIVITY, I AM BACK TO WHERE I LOG IN AS A USER AND ENTER MY PASSWORD AND THEN TAKES ME TO ANY PAGE OF THE APP I WAS USING

    Hello

    Click on desktop and select Customize.

    Click the screen saver icon on the bottom of the window.

    In the window of the screensaver, remove the check mark from the résumé shows the lock screen.

    Click Apply/OK.

    Explanation:

    Even if a screen saver is not enabled if you select the summary option, the system will automatically display the lock screen when the idle time is reached.

    Concerning

  • How to store images in the oracle database and get back on a jsff page in ADF?

    Mr President.

    How to store images in the oracle database and get back on a jsff page in ADF?

    I have students and employees in my database and want to store their pictures against their ID.

    How to do this?

    Concerning

    Tender,

    You can check the links that explain this below.

    https://tompeez.WordPress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-ADF-part-2/

    Johny tips: ADF: display image files from database as a popup in Application Web ADF

    See you soon

    AJ

  • I have placer place text, and then change the font size, but it does not flow to the next page

    Hello! Tell when I have text that fits into a page, because it is absorbed in indesign with a great font size small. Then when I want to increase the font size it does not continue on the next page. How can I get there?

    Thank you very much!!

    Click the port at the bottom right of the text block to recharge the cursor, go to the next page and click to place it.

    If this is new to see you:

    Text of wire among images in Adobe InDesign

    InDesign 03 - Mini tutorials - threads of text - Threads view - overflow of text warnings areas - YouTube

  • How to display the names of header fields in the next page in report6i

    How to display the names of header fields repeated in the next page of report6i urgent please...


    When I'm runing report in 1st page that showing only the header in page 2 information header information does not display only records appear. So I want to display the header in 2nd page also information.

    You can help.

    Hello

    Go for the model of report layout and select these elements/objects that do not display on the next page and pressing the F4 key to open the palette of the property and set the property Print object on to All the Pages , then it will appear on all pages.

    -Clément

  • Details of a master record on the new Page

    Hi guys,.

    I have a requirement where I have a page named Page1 for example.

    1 page 1:

    This page has a few form fields that form the master file and here is that there is an array of advanced, which shows the child records for the master domain

    I've implemented this successfully via ViewLinks and objects of the Association and Page1 works very well

    Now, for each of these child records in Page1, consist of several records of children, which should be displayed in a new Page, suppose for example, Page2

    2 page 2:

    In this 2 page, I would like to enter data into an advanced table (there may be several lines), for each of the child records in Page1.
    After you have entered the data on page 2, I need to go back to page 1.

    In the same way on each of the child records in page 1, I would like to go into details in page 2 and return to page 1.

    Finally, I should be able to Commit or rollback at the end.

    But so far I was not able to do this in the new page. :( Data on page 2 is too much.

    Someone told me that it is not possible in a new page.

    Could someone help me?

    Also good season to all!

    its Possible.
    All you have to do is, just create the same module of RootApplication for 2 pages.
    and use retainAM = is in the navigation between pages.
    That should be enough...

    And when you navigate to the second page, do not call vo.executeQuery () or whatever it is which evacuates the changes pending in the VO.
    When you navigate to the second page, just find the line of girl, that you want to update using vo1.findByprimarykey)
    and use the method vo.setCurrentRow (firstChildRow) the first child VO to refresh the lines of the second child

    See also the exercise of updating in the Toolbox tutorials where the transaction is maintained between the three pages.

    Prasanna-

  • copy is break to the next page and don't sink to the bottom of the text box

    I have a document where text is decorated with style sheets and overrides are disabled, but the text is introduced on the next page, rather than sinking to the bottom of the text box. I've had this problem several times in the past but have never figured out how to fix the problem.

    Sometimes it can also happen without reason - simply because the story

    reestablish has no kick.

    If this is the case, of all the stories to recompose: Shift + Enter to open Quick

    Apply, and then by typing "recompose" should show the required element:

    "Recompose all stories." Sometimes white gaps in the

    at the bottom of pages (quite rare).

    Bonus question: does anyone know what is the difference between "redial".

    all the stories"and" recompose all stories immediately "is (since the two

    seems to work immediately!) ?

  • Error when creating new record in the jspx page.

    Hello! I have error when you try to post the new record in the jspx page (see: http://my.jetscreenshot.com/2677/20100820-oo8z-19kb)

    DB I trigger and in the EO primary key attribute I Type set to DBSequence.

    Where is the problem and what to do?

    Best regards, Debuger

    @Sireesha excellent point!

    @Debugger the reason why you get the error, it is you're missing an af:convertNumber, however, as said Jean Lou, why even put a DBSequence field on your screen?

    John

  • Icons wiggle and move in the home screen but will not go to the next page

    Icons wiggle and move in the home screen but will not go to the next page

    You need to move to the edge and hold the button for a few seconds so he can move to another screen.

  • Sending an id to the next page

    Hello

    Need more help please. OK, so I've created this site to database. Everything works perfectly, but when my pages redirect it does not send the value of the id to the next page if I add '? ID = 5"manually in the browser address bar, and then it displays the correct details for this particular id. How to use dreamweaver for the generated send me to keep the site working properly? What I have to physically php code or is there a Dreamweaver feature that can do this for me?

    Please can help you.

    Thank you

    Owen

    Owen,

    Provide a recommendation more detailed your query. Shooting in the dark is not desired by volunteer contributors of this forum. Ideally the session for the user id must be created during its connection, defined not based the result of a query later.

    You wrote:

    What I want to do is once a user registers on the registration page that the page should redirect to a success page and have a message ' thanks user X for recording.

    You can also this simply echo the value post on page registration success the user name 'name' which was 'named' regardless of the registration form. If field registration form for the user name is called echo on the success page username by entering this php

    Thanks for registration.

    The item values survive that the duration of a pageload. After that, they are destroyed. So if you want to keep the data to display then you need to create a session for the post value variable. Google the term How to create the session variable or similar term and you will no doubt find countless resources that explain the process entirely.

    Remember that by default Dreamweaver Server behavior connection automagically creates the SESSION ["MM_Username"] for the username of the logged in user. Simply echo the SESSION ["MM_Username'] to display the user name for the user connected.

    Look here: http://cookbooks.adobe.com/post_Display_user_s_name_and_other_details_after_login-16672.ht ml

    best,

    Shocker

  • Slideshow running on the next page on the content viewer

    For my iPad, I have a selection of slideshows that are displayed in the forms below.

    They work very well and display different images at different times.

    However when I slip across the page to display the next page the honeycomb to the right of the screenshot appear and animate out there also.

    So in other words, the parties in the grey areas are still visible on the next page.

    I tried to combine these, inserting into an empty frame and then making it by making the image smaller, but it was not effective.

    Any ideas?

    #Untitled-1.jpg

    Doesn't work that way, I'm afraid. You must correct the content itself, so it

    the page is not served. That must be done for each State.

  • Carrying a $_POST vars on the next page

    I have a page that uses variables $_POST to insert a record - simple form processing.

    What I'm trying to do is to use these same variables of $_POST in the next page (after submit) to create an email that will then be used to verify that the e-mail address is real.

    I am fairly new to this and I don't know how to do this...

    I thought using the following, I could re - enter variables and use them on the next page, but obviously not.

    <? PHP
    $username = $_POST ['username'];
    $postgroupcode = $_POST ["groupcode"];
    $email = $_POST ['email'];
    $title = $_POST ["title"];
    $firstname = $_POST ["firstname"];
    $lastname = $_POST ['name'];
    ? >

    Does this mean I put the mail function in the same page as the record insertion function?

    EviePhillips wrote:
    > BUT how you can use this information on other pages of the site? What type
    > "variable" you would create and how?

    Use a session variable.

    Put this at the beginning of the page:

    session_start();

    Then enter the variable of $_POST and assign it to the variable $_SESSION
    Like this:

    If (isset($_POST['variableName'])) {}
    $_SESSION ["VariableName"] = $_POST ["VariableName"];
    }

    If your server uses magic quotes (execute the phpinfo() function and see if)
    magic_quotes_gpc is 'On'), modify the above code to this:

    If (isset($_POST['variableName'])) {}
    $_SESSION ["VariableName"] = stripslashes($_POST['variableName']);
    }

    You now have access to $_SESSION ["VariableName"] in any page that begins
    with session_start().

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Passing values to the next page

    Hello

    I use Apex 4.2.5 in Oracle 11 g

    I've created a form that transmits its value to another page when a button is clicked.

    The field of employment in the page of the form has values like 'SELLER' in a folder,

    "ANALYST" in the next record...

    This page contains a button, and when it is selected, the values are passed to the page successfully as

    The problem is that some areas of employment are having values such as "PROGRAMMER, systems ANALYST.

    separated by commas in a record. When these values are passed to the next page, I get only the first job. and the rest is not.

    In the previous example, I get only PROGRAMMER and not the SYSTEM ANALYST.

    but when I change the field to be as "PROGRAMMER/ANALYST" then it works. Why not with commas?

    Thanks in advance

    KJ

    KJChellam wrote:

    I use Apex 4.2.5 in Oracle 11 g

    I've created a form that transmits its value to another page when a button is clicked.

    The field of employment in the page of the form has values like 'SELLER' in a folder,

    "ANALYST" in the next record...

    This page contains a button, and when it is selected, the values are passed to the page successfully as

    The problem is that some areas of employment are having values such as "PROGRAMMER, systems ANALYST.

    separated by commas in a record. When these values are passed to the next page, I get only the first job. and the rest is not.

    In the previous example, I get only PROGRAMMER and not the SYSTEM ANALYST.

    but when I change the field to be as "PROGRAMMER/ANALYST" then it works. Why not with commas?

    Commas are used to separate the values of each element.

    You should avoid passing string values that may contain any reserved characters in the URL in links. It is not to transfer data in the URL, other than the minimum possible number of discrete alphanumeric identifiers. Values required in a target page can be recovered in the element source and properties by default, calculations or using these values of process ID, or by referencing the other page element values or application already in session state.

    The values containing a colon cannot be passed through the URL. The values containing commas can be passed if the value is escaped with backslashes:

    &P10_ENAME.,\&P10_JOBS.\

Maybe you are looking for