ecabrera Posted July 27, 2011 Author Share Posted July 27, 2011 nevermind fixed it thanks for everything Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1247843 Share on other sites More sharing options...
ecabrera Posted July 27, 2011 Author Share Posted July 27, 2011 ok this is wat i did to get the view the video i must have dont been paying attention when i wrote this but i remove the htmltext from $description = htmltext($description); and bang videos but it gave me errors Notice: Undefined index: commentbtn in /home/ecabrera/public_html/videos.php on line 92 if ($_POST['commentbtn']){ Notice: Undefined index: s in /home/ecabrera/public_html/videos.php on line 131 $start = $_GET['s']; Notice: Undefined variable: username in /home/ecabrera/public_html/videos.php on line 168 if ($username){ Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1247853 Share on other sites More sharing options...
Muddy_Funster Posted July 27, 2011 Share Posted July 27, 2011 ok 1st one - use the @ symbol like we covered earlier if (@$_POST['commentbtn']){ 2nd one - you didn't change the code like a I suggested, change the code for the code block at line 131 to $perpage = 10; if(@$_GET['s']){ $start = $_GET['s']; } else{ $start = 0; } 3rd one - another @ symbol here if (@$username){ Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1247868 Share on other sites More sharing options...
ecabrera Posted July 27, 2011 Author Share Posted July 27, 2011 can u help me with if (@$_POST['commentbtn']){ and if (@$username){ again i forgot please Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1247889 Share on other sites More sharing options...
ecabrera Posted July 27, 2011 Author Share Posted July 27, 2011 look sry if you dont understand me but im createing a project and i havent slept in like 2 days im so tired when i paste this to my script a comment box should appear but it does not instead this happens Notice: Undefined index: commentbtn in /home/ecabrera/public_html/videos.php on line 94 and if i try (@$_POST['commentbtn']){ i will just surpass that but i dont want that // comment section echo "<a name='comments'></a><div style='margin-top: 15px;'> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div class='top'>$title Comments</div> </div> <div class='bottom'>"; // comment button action if (@$_POST['commentbtn']){ $comment = $_POST['comment']; if ($comment){ if ($userid != $getid){ $query = mysql_query("SELECT * FROM video_comments WHERE video_id='$getid' AND user_id='$userid' AND comment='$comment'"); $numerows = mysql_num_rows($query); if ($numrows != 0){ $commdate = date("F d, Y"); // October 08, 2010 mysql_query("INSERT INTO video_comments VALUES ('', '$getid', '$userid', '$username', '$comment', '$commdate')"); Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1247976 Share on other sites More sharing options...
Muddy_Funster Posted July 28, 2011 Share Posted July 28, 2011 yeah, I think the word you wanted was supress, not surpass. It's the only option for the way you are checking the value. you are basicly saying "If this value has been assigned, do this-" however, any time that the value is unassigned you will get that notice up. you are either going to have to change the way you check for the form having been submitted (and quite a few other things as well) or use the @ to suppress the notice. Quote Link to comment https://forums.phpfreaks.com/topic/242917-helppppp-me/page/2/#findComment-1248357 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.