Jump to content

helppppp me


ecabrera

Recommended Posts

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){

Link to comment
Share on other sites

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){

Link to comment
Share on other sites

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')");

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.