ecabrera Posted April 28, 2012 Share Posted April 28, 2012 ok so i can get this to work so i want to check if there is a video on inside my db if there is no video and nothing happens but if there is i want it to echo video <?php if($video == ""){ }else{ echo "VIDEO"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/261776-if-check/ Share on other sites More sharing options...
NLT Posted April 28, 2012 Share Posted April 28, 2012 You need to give us more information. What is the value of $video? Quote Link to comment https://forums.phpfreaks.com/topic/261776-if-check/#findComment-1341434 Share on other sites More sharing options...
ecabrera Posted April 28, 2012 Author Share Posted April 28, 2012 <?php $viewid = (int)$_GET['v']; include "staff/scripts/connect.php"; $query = mysql_query("SELECT * FROM headlines WHERE id=$viewid"); $rows = mysql_fetch_assoc($query); $title = stripslashes($rows['title']); $author = stripslashes($rows['author']); $date = stripslashes($rows['date']); $picture = stripslashes($rows['picture']); $headline = nl2br(stripslashes($rows['headline'])); $video = stripslashes($rows['video']); mysql_close(); ?> so im just trying to see if there is anything inside Quote Link to comment https://forums.phpfreaks.com/topic/261776-if-check/#findComment-1341435 Share on other sites More sharing options...
ecabrera Posted April 28, 2012 Author Share Posted April 28, 2012 the value is just a video Quote Link to comment https://forums.phpfreaks.com/topic/261776-if-check/#findComment-1341437 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.