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) 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 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)) { } 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 Link to comment https://forums.phpfreaks.com/topic/55717-solved-ifs-and-include/#findComment-275294 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.