JTapp Posted April 13, 2008 Share Posted April 13, 2008 I don't know- maybe I'm just exhausted looking and testing this script... but I can't get it right. I simply need to add another submit button to this script based on field name "intDistrictID" and pointed to 4view.php Is there some reason why I wouldn't be able to do it? $query = mysql_query("SELECT strLodgeName, intLodgeNumber, intDistrictID, strLodgeMailingCity, strLodgeMailingPostCode FROM tblLodges WHERE TRIM(LEADING '0' FROM $metode) = '$search' GROUP BY strLodgeName LIMIT 50"); while ($row = @mysql_fetch_array($query)) { echo "<tr bgcolor=\"#dddddd\"><td><center>"; echo $row["intLodgeNumber"]; echo "</center></td><td><center>"; echo $row["strLodgeName"]; echo "</center></td><td><center><span class=\"style2\">"; echo "<input name=\"submit\" type=\"button\" value=\"Lodge Details\" onclick=\"javascript:window.location='3view.php?id="; echo $row["intLodgeNumber"]; echo "'\" /></center></td>"; echo "</center></td><td><center>"; echo $row["strLodgeMailingCity"]; echo "</center></td><td><center>"; echo ltrim($row["intDistrictID"], '0'); Link to comment https://forums.phpfreaks.com/topic/100958-problem-with-submit-button/ Share on other sites More sharing options...
themistral Posted April 13, 2008 Share Posted April 13, 2008 A submit button processes a form action therefore you can't have 2 submit buttons doing different things as there is only ever 1 form action. Can you use an image link to do what you want rather than a submit button? Link to comment https://forums.phpfreaks.com/topic/100958-problem-with-submit-button/#findComment-516320 Share on other sites More sharing options...
JTapp Posted April 13, 2008 Author Share Posted April 13, 2008 themistral - can you further elaborate or send me a link to an example of what you are talking about? Thanks Link to comment https://forums.phpfreaks.com/topic/100958-problem-with-submit-button/#findComment-516332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.