Skip to content
Advertisement

passing varables’ value from one form to another in php

I have three forms – payment.php , payment1.php and paydb.php . payment.php contains the front end form.payment1.php contains the back end of the form of payment.php. whereas we are shifting to paydb.php from payment1.php. Now I’m filling the form by entering member number in payment.php which is retrieved in a variable $member_no in payment1.php .Now I want to get the value of member_no in paydb.php . How to do that ?

Advertisement

Answer

After receiving $member_no in payment1.php redirect to paybd.php with a get array using

header('Location: http://www.example.com/paydb.php?member_no=$member_no');

then receive $_GET[‘member_no’] number and assign to a variable example:

$member_no = $_GET['member_no']
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement