wrathican Posted June 15, 2007 Share Posted June 15, 2007 hey what i want is an if statement that sees if a variable empty if it is, i want my user to select something to make the ID have a value // i already have this part coded if the variable contains a value, any value at all, i want it to show the article // i already have this part coded the variable is coming from the url and is only a number (the id of an article) Quote Link to comment https://forums.phpfreaks.com/topic/55717-solved-ifs-and-include/ Share on other sites More sharing options...
chocopi Posted June 15, 2007 Share Posted June 15, 2007 what do you mean by select something ? Do you mean a link, button, radio etc Quote Link to comment https://forums.phpfreaks.com/topic/55717-solved-ifs-and-include/#findComment-275285 Share on other sites More sharing options...
MrSheen Posted June 15, 2007 Share Posted June 15, 2007 You can use the "isset" command.. if(isset($variable)) { } But as you are asking for the variable to NOT be set: if(!isset($variable)) { } Quote Link to comment https://forums.phpfreaks.com/topic/55717-solved-ifs-and-include/#findComment-275287 Share on other sites More sharing options...
wrathican Posted June 15, 2007 Author Share Posted June 15, 2007 ahh excellent. thanks i forgot about isset Quote Link to comment https://forums.phpfreaks.com/topic/55717-solved-ifs-and-include/#findComment-275294 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.