hanwei Posted November 10, 2006 Share Posted November 10, 2006 hi,I have 2 accessLvL here. One is Engineer, another one is View. i want those with Engineer rights to go into the page(ticket-details.php), while all those with View rights to go into this page(ticket-details2.php) when the search button is clicked.so can anyone advise me how to do it? thanks[sup]if ($accessLvL == "Engineer")....else....[/sup][code]<form method="post" action="ticket-details.php"<p align="center"> <input type=text size=18 name="viewTT"><input type=submit value="Search"</p></form>[/code] Link to comment https://forums.phpfreaks.com/topic/26802-one-button-2-links/ Share on other sites More sharing options...
JasonLewis Posted November 10, 2006 Share Posted November 10, 2006 well you could just go.[code=php:0]<?phpif($accessLvl == "Engineer"){$action = "ticket-details.php";}else{$action = "ticket-details2.php";}?><form method="post" action="<?php echo $action; ?>"<p align="center"> <input type=text size=18 name="viewTT"><input type=submit value="Search"></p></form>[/code]ohh and i your submit button was wrong. you didn't have the closing > Link to comment https://forums.phpfreaks.com/topic/26802-one-button-2-links/#findComment-122600 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.