Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP Stored Procedure and Next Page

Options
  • 18-03-2015 5:24pm
    #1
    Banned (with Prison Access) Posts: 1,279 ✭✭✭


    I have a form where I want to save the values of a set of textboxes to a mysql database by calling a stored procedure and also open the next page in set of conceptually linked pages.

    Say the first page is demographics.php and then I want to have paymentinfo.php open after demographics but save the demographics using the stored procedure.

    Currently I can save the information using the stored procedure or I can call another page.
    If I leave the action blank I get the stored procedure
    <form class="contact_form" action="" method="post" name="contact_form">
    
    if I set the action to paymentinfo.php I get the new page
    <form class="contact_form" action="paymentinfo.php" method="post" name="contact_form">
    

    Any advice?


Comments

  • Registered Users Posts: 2,031 ✭✭✭colm_c


    Not sure what you're trying to do, but what you are talking about are two completely unrelated things -- stored procedures and html forms.

    When you put the action="" it means you're posting to the current url that you are on (e.g. demographics.php), when you put in the paymentinfo.php into the action, you are posting the data to that url.

    Sounds like you need to post to the current page (and do whatever you need in php/stored procedures) and then redirect to paymentinfo.php.


  • Banned (with Prison Access) Posts: 1,279 ✭✭✭kidneyfan


    Thanks a million. I used
    header( 'Location: paymentinfo.php' );


    Your post really helped because I didn't know that the core word for searching was redirect.


Advertisement