zgkhoo Posted August 18, 2007 Share Posted August 18, 2007 eg. //file 1= form1.php <form action="register2.php" method="post"> <tr><td>username<td> <td><input type="text" name="username"/></td></tr> <td><input type="submit" /></td> //file2=register2.php <form action="confirm.php" method="post"> <tr><td>game id<td> <td><input type="text" name="gameid"/></td></tr> <td><input type="submit" /></td> //file3=confirm.php <form action="store.php" method="post"> <tr><td>Confirm?<td><td></tr> <td><input type="submit" /></td> //file4=store.php $sql="INSERT INTO person (Username,GameID) VALUES ('$_POST[username]','$_POST[gameid]') how can i pass the value username of form1.php and gameid of register2.php to store.php? seem only just confirm.php interact with store.php which only confirm.php with <form action="store.php" method="post"> this command.. thanks. Quote Link to comment https://forums.phpfreaks.com/topic/65549-solved-how-to-pass-form-input-through-several-php-document/ Share on other sites More sharing options...
tippy_102 Posted August 18, 2007 Share Posted August 18, 2007 Use sessions to store the data. Example: if(isset($_POST["submit"])) { session_start(); $_SESSION["username"] = $_POST["username"]; Quote Link to comment https://forums.phpfreaks.com/topic/65549-solved-how-to-pass-form-input-through-several-php-document/#findComment-327297 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.