maxudaskin Posted January 6, 2008 Share Posted January 6, 2008 Is there a way to use isset on a MySQL LONGTEXT data? <?php $book_data_sql = mysql_query("select * from flights WHERE flight_num = '{$fltnum}'"); while($book_data = mysql_fetch_array($book_data_sql)){ if(!isset($book_data['route'])){ echo '<textarea name="route" rows="5" id="route" style="width:100%"></textarea>'; }else{ echo '<textarea disabled name="route_disabled" rows="5" id="route" style="background:url(../images/route_bkg.jpg) no-repeat; width:100%">'.$route.'</textarea>'; echo '<input name="route" type="hidden" value="$route" />'; }} ?> Even if there is no data in the table, it still shows the disabled text area. Quote Link to comment https://forums.phpfreaks.com/topic/84787-solved-mysql-isset/ Share on other sites More sharing options...
redarrow Posted January 6, 2008 Share Posted January 6, 2008 try empty Quote Link to comment https://forums.phpfreaks.com/topic/84787-solved-mysql-isset/#findComment-432142 Share on other sites More sharing options...
maxudaskin Posted January 6, 2008 Author Share Posted January 6, 2008 What do you mean 'try empty'? Quote Link to comment https://forums.phpfreaks.com/topic/84787-solved-mysql-isset/#findComment-432163 Share on other sites More sharing options...
revraz Posted January 6, 2008 Share Posted January 6, 2008 if(!empty($book_data['route'])){ isset checks to see if its set or not, not if it's empty. So you can either check empty or =="" Quote Link to comment https://forums.phpfreaks.com/topic/84787-solved-mysql-isset/#findComment-432167 Share on other sites More sharing options...
teng84 Posted January 6, 2008 Share Posted January 6, 2008 double post disable the other thread....!! http://www.phpfreaks.com/forums/index.php/topic,175925.new.html#new Quote Link to comment https://forums.phpfreaks.com/topic/84787-solved-mysql-isset/#findComment-432168 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.