Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

PHP Stored Procedure and Next Page

  • 18-03-2015 04: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, Registered Users 2 Posts: 2,011 ✭✭✭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