eccentruck
eccentruck

Reputation: 1

Button next as button submit

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>

Upvotes: 0

Views: 1165

Answers (2)

DarkSideKillaz
DarkSideKillaz

Reputation: 138

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>

Upvotes: 2

FreedomPride
FreedomPride

Reputation: 1102

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>

Upvotes: 0

Related Questions