Jump to content

Minimeallolla

Members
  • Posts

    197
  • Joined

  • Last visited

    Never

Everything posted by Minimeallolla

  1. ok thanks now i only have 2 errors remainning that ive tried but cannot solve \= document type does not allow element "BODY" here <body> end tag for element "HEAD" which is not open </ul></div></head> view the source code of my site if you need to. http://www.mysite.giacjr.dino-hosting.net/index.php
  2. http://validator.w3.org/check?uri=http%3A%2F%2Fmysite.giacjr.dino-hosting.net&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group=0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.1 I dont understand these errors and need some help. document type does not allow element "LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag <li><a href='/index.php'>Home</a></li> document type does not allow element "LINK" here <link href="style.css" rel="stylesheet">
  3. sorry but could you please elaborate? and if you are the person that said to use echo instead of die, as i said, echo allows the php to execute when it is not intended.
  4. ok, it still didnt do anything ): <form name="commentbox" action="" method="post">
  5. what about if i did something like <text area>? i want to do that with my css table/border/box thing
  6. ok so i got rid of the php self and it was just an outake from my whole code.. here it is <div id="mydiv"> <a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'block') { document.getElementById('mydiv').style.display = 'block'; } else{ document.getElementById('mydiv').style.display = 'none'; }">Hide/Show comments</a> <div class='navbar'><br> <?php include ("database.php"); $query = ("SELECT * FROM homecomments"); $result = mysql_query("SELECT * FROM homecomments"); while($row = mysql_fetch_array($result)) { include ("echocomments.php"); } ini_set ("display_errors", "1"); error_reporting(E_ALL); if (isset($_POST['submit'])) { $check = mysql_query("SELECT active FROM users WHERE active ='1' AND username='$username'") or die(mysql_error()); $check2 = mysql_num_rows($check); if ($check2 != 1) { die('You are not allowed to comment untill your account is activated.'); }else{ $comment = mysql_real_escape_string(stripslashes(trim($_POST['comment']))); $username = mysql_real_escape_string(stripslashes(trim($_COOKIE['ID_my_site']))); $usercheck = ( $_COOKIE['ID_my_site'] ); $commentcheck = $_POST['comment']; $check = mysql_query("SELECT * FROM homecomments WHERE comment = '$commentcheck' AND username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); if ($check2 != 0) { die('Anti Spam has detected multiple comments posted.'); }else{ if ($commentcheck == "Comment...") { die(' <META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\"> '); }else{ // now we insert it into the database $insert = "INSERT INTO homecomments (username, comment) VALUES ('$username', '$comment')"; $add_member = mysql_query($insert); { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\">"; } } } } } ?> <br> <p> <center> <form name="commentbox" method="post"> <table border="0"> <textarea name="comment" cols="20" rows="2" onclick="document.commentbox.comment.value='';" onfocus="this.style.borderColor='yellow';" onblur="this.style.borderColor='blue';" />Comment...</textarea> </td></tr> <tr><th colspan=2><input type="submit" name="submit" value="Submit"> <colspan=2><input type="submit" name="refresh" value="Refresh"></th></tr> </table> </form><br /> </div></div> <a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none') { document.getElementById('mydiv').style.display = 'block'; } else{ document.getElementById('mydiv').style.display = 'none'; }">Hide/Show comments</a> <br>
  7. <form name="commentbox" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table border="0"> <textarea name="comment" cols="20" rows="2" onclick="document.commentbox.comment.value='';" onfocus="this.style.borderColor='yellow';" onblur="this.style.borderColor='blue';" />Comment...</textarea> </td></tr> $commentcheck = $_POST['comment']; if ($commentcheck == "Comment...") { die(' <META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\"> '); }else why does this not refresh if i comment "Comment..." it just dies and doesnt echo anything
  8. that really does not make a difference because im only echoing a message not calling a function or file? \= well i have a line on the website saying hide/show comments and onclick it hides/shows the comments, obviously, but if you post the same comment twice it will end the comment section and only show the comments and echo at the very bottom the message and you can "glitch" the site by click hide/show comments because there should be 2, it hides all the comments and i made it abit complex so since there is only one hide/show comments theres no way of redisplaying the comments \= . its not something that is going to effect the site greatly or even something that few will notice but its just a little "bug" that i would like to fix
  9. <div id="mydiv"> <a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'block') { document.getElementById('mydiv').style.display = 'block'; } else{ document.getElementById('mydiv').style.display = 'none'; }">Hide/Show comments</a> <div class='navbar'><br> <?php include ("database.php"); $query = ("SELECT * FROM homecomments"); $result = mysql_query("SELECT * FROM homecomments"); while($row = mysql_fetch_array($result)) { include ("echocomments.php"); } ini_set ("display_errors", "1"); error_reporting(E_ALL); if (isset($_POST['submit'])) { $check = mysql_query("SELECT active FROM users WHERE active ='1' AND username='$username'") or die(mysql_error()); $check2 = mysql_num_rows($check); if ($check2 != 1) { die('You are not allowed to comment untill your account is activated.'); }else{ $comment = mysql_real_escape_string(stripslashes(trim($_POST['comment']))); $username = mysql_real_escape_string(stripslashes(trim($_COOKIE['ID_my_site']))); $usercheck = ( $_COOKIE['ID_my_site'] ); $commentcheck = $_POST['comment']; $check = mysql_query("SELECT * FROM homecomments WHERE comment = '$commentcheck' AND username = '$usercheck'") or die(mysql_error()); $check2 = mysql_num_rows($check); //my so called anti spam if ($check2 != 0) { die('Anti Spam has detected multiple comments posted.'); } // now we insert it into the database $insert = "INSERT INTO homecomments (username, comment) VALUES ('$username', '$comment')"; $add_member = mysql_query($insert); { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\">"; } } } ?> <br> <p> <center> <form name="commentbox" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table border="0"> <textarea name="comment" cols="20" rows="2" onclick="document.commentbox.comment.value='';">Comment...</textarea> </td></tr> <tr><th colspan=2><input type="submit" name="submit" value="Submit"> <colspan=2><input type="submit" name="refresh" value="Refresh"></th></tr> </table> </form><br /> </div></div> <a href="javascript:;" onmousedown="if(document.getElementById('mydiv').style.display == 'none') { document.getElementById('mydiv').style.display = 'block'; } else{ document.getElementById('mydiv').style.display = 'none'; }">Hide/Show comments</a> <br> as you can see this code " if ($check2 != 0) { die('Anti Spam has detected multiple comments posted.'); } " ends everything else if double posted. i want to like display a message but still show the comment section etc. not display a message and cut everything else out. it is also the same problem with " die('You are not allowed to comment untill your account is activated.'); }else{ " do you get what im trying to do?
  10. how can i use die but still continue with the html in the rest of code instead of stopping all codes from where die is initiated. i want to die (insert into database) but then still allow the html codes below the die function to work still. \=
  11. yes but others can. its got a 150 character limit but if someone wants to spam they can make it look untidy haha ):
  12. http://www.mysite.giacjr.dino-hosting.net/ see for yourself but you have to register and log in to see the comments. if you do i think more than 36 characters without spacing it overflows out of the box and is chat lol how do i fix that?
  13. well since it is going into the database you might wanna just incase.
  14. ops sorry, you have to register and log in, must need a real email due to verification code ):
  15. I added a css bubble thing around my comment and if it reaches i think 36 characteres with no spacing it breaks out of the buble and keeps going in a straight line. if i type over 35 words it will auto breakline and stay inside the bubble but i need fix this and i have no idea how. http://www.mysite.giacjr.dino-hosting.net/index.php take a look, it will explain itself alot better than i just did.
  16. NET-enabling start-tag requires SHORTTAG YES <link href="style.css" rel="stylesheet" />
  17. you could use it in an if statement that would only run the script once? print("<meta http-equiv='Refresh' content='0;index.php' />");
  18. I dont understand this error document type does not allow element "A" here; missing one of "P", "H1", "H2", "H3", "H4", "H5", "H6", "PRE", "DIV", "ADDRESS" start-tag …lt='Log in'></a><a href='register.php'><img src='/4.png' alt='Register'></a><a…
  19. Do I need to put this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> in every file that has html or only the index?
  20. well what doc type would best suit it? i dont want to make it based on a gaming community
  21. www.mysite.giacjr.dino-hosting.net its too plain and blank. but I cannot think of a thing ! ):
  22. so where you put //make post i put if (isset($_POST[;submit;]) )? well this is my code, im sure you just putting it in will save lots of time explainning and blabla lol \= if (isset($_POST['submit'])) { $check = mysql_query("SELECT active FROM users WHERE active ='1' AND username='$username'") or die(mysql_error()); $check2 = mysql_num_rows($check); if ($check2 != 1) { die('You are not allowed to comment untill your account is activated.'); }else{ $comment = mysql_real_escape_string(stripslashes(trim($_POST['comment']))); $insert = "INSERT INTO homecomments (username, comment) VALUES ('[$username]', '[$comment]')"; $add_member = mysql_query($insert); { echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\">"; } } }
  23. your comments make it so confusing lol \= where would it go, before the if isset submit or after? \=
×
×
  • 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.