phpsql1 Posted May 23, 2007 Share Posted May 23, 2007 I have two html pages the first one has email, and name input s. the second page should have amoung other things these two info. I want to display them into the apropriate inputs of the second page while it is being loaded I already assigned those values to variables in php file but my concern is mainly how to use them. any ideas. thanks Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/ Share on other sites More sharing options...
Barand Posted May 23, 2007 Share Posted May 23, 2007 What code have you so far? Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/#findComment-260171 Share on other sites More sharing options...
phpsql1 Posted May 23, 2007 Author Share Posted May 23, 2007 the first page has a accept input with value = 'next'. once I hit 'next' the php relative to the form of the first page is called (gnrlFrm_Pass.php) this file contains the following <?php $user = trim($_POST['username']); $email = trim($_POST['email']); iclude("gnrlFrm_Main.htm"); ?> where username and email are input of type 'text' in (gnrlFrm_Pass.htm). and I want to transfer the values in these input to the appropriate inputs in the second page (gnrlFrm_Pass.htm), so that when this page is loaded the info should be there (for the user not to enter them again) thanks Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/#findComment-260199 Share on other sites More sharing options...
Barand Posted May 23, 2007 Share Posted May 23, 2007 Then the input fields in the form need their values setting eg <input name='username' value='<php echo $username ?>'> Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/#findComment-260207 Share on other sites More sharing options...
phpsql1 Posted May 23, 2007 Author Share Posted May 23, 2007 are you trying to say this: in the first page: we have <input type "text" name "username"> in the php file related to the form of this page we have $username = $_POST(['username']) in the second page: we have: we have <input type "text" name "theuser"> this last line should be changed to <input type "text" name "usename" value "<php echo $username ?>" > is that what you 're trying to say thanks Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/#findComment-260225 Share on other sites More sharing options...
phpsql1 Posted May 23, 2007 Author Share Posted May 23, 2007 thanks a lot guys Link to comment https://forums.phpfreaks.com/topic/52687-solved-assing-values-to-the-input-of-pagea-from-pageb-while-pagea-is-being-loaded/#findComment-260234 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.