HoTDaWg Posted December 30, 2006 Share Posted December 30, 2006 hi, i have a line here that checks if a total of 6 fields have been filled in, but i cant figure out the best way to say if the variables artist1,artist2,artist3,song1,song2,and song3 are filled inhere is what i have so far:[code]if(isset($artist1 && $song1 && $artist2 && $song2 && $artist3 && $song3){[/code]any help would greatly be appreciated. thanks.HoTDaWg Link to comment https://forums.phpfreaks.com/topic/32327-solved-is-it-correc-to-say/ Share on other sites More sharing options...
fert Posted December 31, 2006 Share Posted December 31, 2006 you can't do thatyou would need to do[code]if(isset($artist1) && isset($song1) && isset($artist2) && isset($song2) && isset($artist3) && isset($song3)){[/code] Link to comment https://forums.phpfreaks.com/topic/32327-solved-is-it-correc-to-say/#findComment-150128 Share on other sites More sharing options...
HoTDaWg Posted December 31, 2006 Author Share Posted December 31, 2006 thanks man, it makes sense, but do the same rules still apply with this line?:[code]$request = "SELECT * FROM songs WHERE randomcode1, randomecode2, randomcode3 ='".$randomcode."'";[/code] Link to comment https://forums.phpfreaks.com/topic/32327-solved-is-it-correc-to-say/#findComment-150185 Share on other sites More sharing options...
trq Posted December 31, 2006 Share Posted December 31, 2006 Yes, even though that is a different language. Link to comment https://forums.phpfreaks.com/topic/32327-solved-is-it-correc-to-say/#findComment-150187 Share on other sites More sharing options...
HoTDaWg Posted December 31, 2006 Author Share Posted December 31, 2006 thanks. Link to comment https://forums.phpfreaks.com/topic/32327-solved-is-it-correc-to-say/#findComment-150191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.