0

hye im trying to make NEXT button and SUBMIT button as one button. Can we do that ? here is my code

sorry here is part of the code. this code is about 5 questions that have assigned marks. for example if you checked the first column,you are checking 8 marks. suppose my next page is work_standard.php which consist questions too. since i have calculation in my form,i need to submit the value to score.php because after answering the questions,it will be totaled at score.php

<html> <form action="score.php" method="post"> <table class="hoverTable" style="width:80%" table align="center"> <td>Discipline</td> <td>Well-Disciplined. Always set a high personal standard. <br><br> <label class='radiolabel'><input type="radio" name="discipline" value="8" <?php echo ($a==8 ? 'checked' : '');?> />8</label><br/> </td> <td>Very willing to do work. Respect rules and regulations. <br><br> <input type="radio" name="discipline" value="7" > 7 <input type="radio" name="discipline" value="6"> 6<br> </td> <td>Generally willing to do work. Do not give too much trouble. <br><br> <input type="radio" name="discipline" value="5" > 5 <input type="radio" name="discipline" value="4"> 4 <input type="radio" name="discipline" value="3">3 </td> <td>Often shows unwillingness to do work. Discard rules if encouraged by others. <input type="radio" name="discipline" value="2" > 2 <input type="radio" name="discipline" value="1"> 1 </td> <td>No respect for Company’s rules. Always gives excuses to orders. <br><br> <input type="radio" name="discipline" value="0" > 0 </td> </tr> </table> <div class="container"> <ul class="pager"> <li><a href="firstpage.php">Previous</a></li> <li><a href="work_standard.php">Next</a></li> </ul> </div> </form> </html> 
3
  • 2
    More code to demonstration your situation, please. Commented Feb 24, 2017 at 4:00
  • 2
    Possible duplicate of Use a normal link to submit a form Commented Feb 24, 2017 at 4:03
  • 1
    for starters there is nothing to submit in this code (there is no form) please provide a minimal reproducible example Commented Feb 24, 2017 at 4:03

2 Answers 2

2

You Could Just Change the name of a submit EX:

<form name="theform" action="work_standard.php" method="post"> <input type="text" /> <input type="submit" name="submit" value="Next"> // this would change your button text to next. </form><form name="prevform" action="firstpage.php" method="post"> <input type="submit" name="prev" value="Previous"></form> 
Sign up to request clarification or add additional context in comments.

Comments

0

Well, you could use this method:

<a href="http://www.microsoft.com" target="_blank" onclick="window.open('http://www.google.com'); window.open('http://www.yahoo.com');">Click Here</a> 

For your answer:

 <a href="firstpage.php" target="_blank" onclick="window.open('work_standard.php'); ">Next</a> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.