javascript - Can I pass value of textfield to a php link? -


i have textfield in html file.

<input type='date' value='startdate' name='sdate' id='startdate' > 

what trying do, pass value of above textfield php link this

<a href='admin-confirm.php?startdate=??????'>     <input type='button' value='confirm' name='confirm' > </a> 

what should put on href pass value of textfield 'startdate' php file? me pls. in advance :)

ps: have tried using form, i'm having trouble when there 2 set of data displayed.

for example:

  1. name: example1 [confirm button]
  2. name: example2 [confirm button]

my problem when click confirm button on number 1, values in number 2 sent.

there many issues tiny bit of code. never wrap submit button in link. usecase? admin-confirm called when button clicked?

the form work without code:

<form action="admin-confirm.php"> <input type='date' value='' name='startdate' id='startdate' > <input type='submit' value='deny' name='deny' > </form> 

alternative ajax date when link clicked need tell more


Comments