Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

passing PHP variables to different web pages.

Guest
Apr 04, 2007 Apr 04, 2007
I want a user to input something into a form (in this case, gold, silver or bronze) and then upon pressing submit I want the value to be sent to a PHP page where the information will be displayed. So if a user types gold a query will run and display all matches to the form on the first page, I do not want the results on the same page. This is probably quite easy but I want multiple forms on one page and then multiples PHP pages linked to the original page if that makes any sense...
TOPICS
Server side applications
263
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 04, 2007 Apr 04, 2007
LATEST
in general the value of form elements (e.g. input fields, select menus) can be retrieved using the $_POST['formelement_name'] variable on the follow up page -- and you can also use this thing within a query, like this...

"SELECT * FROM table_name WHERE medal = '".$_POST['medal_type']."'"

>>
This is probably quite easy but I want multiple forms on one page and then multiples PHP pages linked to the original page
>>

that shouldn´t be a problem, simply use a different target page within each form´s "action" field -- e.g. action="check_medals.php"
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines