Jump to content

How Get Varible A Value From Input Form


jawad hamzah
 Share

Recommended Posts

i have form like this <form action='page1.php' method='post'> <input type='text' id='mytext'> <a href='page2.php?var1=hello&var2=(here i want to but input text value ... How?)'>Go To Page2</a></form>I want when i click Go To Page2 open page2.php and print this :var2 : value of mytextfor example if i type in input text this word (Jawad) and click Go To Page then open page2.php and type in it :Hello : JawadMy qession : How i ger the variable (var2) the value of (mytext) in same form Notic : I know to do this by submit button but i want to make it by variabels .Thanks

Link to comment
Share on other sites

above i learn how i but text value in my varible by this code

<a href='page2.php?var1=hello&var2=' onclick="this.href+=document.getElementById('mytext').value">Go To Page2</a>
but i tray to put many values from my form's input but ???then i want like this :If i have three textbox in my form and i want to show it's value in three varible like this :<form action='page1.php' method='post'><input type='text' id='mytext1'><input type='text' id='mytext2'><input type='text' id='mytext3'><a href='page2.php?var1=(value of text1)&var2=(value of text2)&var3=(value of text3)'>Go To Page2</a></form>How i make it please ??
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...