Leftfield Posted February 6, 2011 Share Posted February 6, 2011 Hi all . I have a button now when i click the button an mypages is valid can i make that button in the page invisible in postback with php?? I know you can in C# by saying button1.Visible = false; Thanks for input... Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 6, 2011 Share Posted February 6, 2011 if you want the button to be 'invisible', don't send the button HTML it to the browser. Quote Link to comment Share on other sites More sharing options...
Leftfield Posted February 6, 2011 Author Share Posted February 6, 2011 I know you can do it in Javascript but it is not gonna work that way .. Can you set the Button value with php??? Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted February 6, 2011 Share Posted February 6, 2011 if you want the button to be 'invisible', don't send the button HTML it to the browser. <?php if ($somecondition == 'met') { // show button echo "<input type='submit' name='somebutton' value='hello world'>"; } else { // Don't show button } ?> Quote Link to comment Share on other sites More sharing options...
Leftfield Posted February 6, 2011 Author Share Posted February 6, 2011 Thx i will take a look at it... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.