<h2>Members Page</h2>
Your channels:<p />
<?php
$channel_check = mysqls_query("SELECT channel_name FROM channels WHERE created_by='$user'");
$numrows_cc = mysql_num_rows($channel_check);
if ($numrows_cc == 0) {
echo ''; // They don't have any channels so they need to create one
?>
You haven't made any channels yet, click the button to make one.
<form action='create_channel.php'>
<input type='submit' name='goto_channel_create' value='Create my Channel' />
</form>
<?php
}
else
{
while($row = mysql_fetch_assoc($channel_check)) {
$channel_name = $row['channel_name'];
echo "<b>$channel_name</b> - <a href='channel.php?c=$channel_name'>View Channel</a> | <a href='channel_settings.php?c=$channel_name'>Channel Settings</a><p />";
}
echo "$numrows_cc/5 Channels Created";
}
?>
Hello Guys, Today I was making a website like Youtube and I was Coding my Members.php page and I found this code is not working, can someone say what is missing or wrong so, I am founding this problems. It don't pop out members channels so, can you figure out the wrong code!
$channel_check = mysqls_query("SELECT channel_name FROM channels WHERE created_by='$user'");
In this 4th line, you have used mysqls
, and its spelling is incorrect. You need to change it to mysql
.