fareedreg Posted December 22, 2009 Share Posted December 22, 2009 how to call 2nd.php from 1st.php (along with variable ID) and get back value of 2nd.php variables in 1st.php.. Quote Link to comment Share on other sites More sharing options...
anthylon Posted December 22, 2009 Share Posted December 22, 2009 You may use few directives. Depends what you want achieve try with: require_once("2nd.php"); From that point you may call/use variables and functions from 2nd.php as your local - depends of range. It acts like you have code from both scripts executing in one single file. Cheers! Quote Link to comment Share on other sites More sharing options...
oni-kun Posted December 22, 2009 Share Posted December 22, 2009 Do you know how to use GET/POST? You can send them to "page2.php?id=1&form=submitted" On page2.php, $_GET['id'] and $_GET['form'] will be passed there (as it's in the url) POST does not change the url, but it's a bit more complex if you don't know how to use forms/headers. Quote Link to comment Share on other sites More sharing options...
Deoctor Posted December 22, 2009 Share Posted December 22, 2009 u can use the function like this echo ("<br><a href = 'index.php?<variable>=<string>'>$name_re</a>"); example echo ("<br><a href = 'index.php?rss=$url'>$name_re</a>"); Quote Link to comment 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.