• The address is the same, so why is it not finding the page?

    <!-- Singin box section starts here -->
            <?php
    
    			//If the signin button is pressed
    			if (isset($_POST['action2']) && $_POST['action2'] == "signin") {
    
    				$username = $_POST['username'];
    				$password = $_POST['password'];
    				$query = mysql_query("SELECT * FROM wp_users WHERE user_nicename='".$username."' and user_login='".$password."' ") or die(mysql_error());  
    
    				//Set cookie ----------------------Starts here---------->
    				if (mysql_num_rows($query)>0) {
    					$user = $_POST['username'];
    					setcookie("logon", $user, time()+3600*24 ,"/");
    					$_COOKIE["user"] = $user;
    				}
    
    			}//endif signin
    
    			//Check to see whether the cookie is set ( i.e. password is correct)
    			if (isset($_COOKIE["user"])) { ?>
    				<form id="commentform" name="commentform" method="post" action="">
    					<p><label>Name: </label><input type="text" name="name" /></p>
    					<p><label>E-mail:</label><input type="text" name="email" /></p>
    					<p><label>Comment:</label><textarea name="comment" rows="7" style="width:250px" > </textarea></p>
    					<p><button type="submit" name="action" value="comment_post" >Submit Comment</button></p>
    
    				</form>
    			<?php
    				if (isset($_POST['action']) && $_POST['action'] == "comment_post") {
    					echo 'Block exectuted';
    					//insert the comment
    					//mysql_query("INSERT INTO wp_comments (comment_author,comment_email,comment_date, comment_content) VALUES('".$_POST['name']."','".$_POST['email']."',NOW(),'".$_POST['comment']."','".$_POST['comment']."')") or die(mysql_error());
    				}//endif comment posted
    
    			} else {
    				echo '<p>Password incorrect</p>';
    				commentForm();
    			}//endif password correct/incorrect
    		?>
            </div>
            </div>
            <!-- Leave comment ends box -->
    		<!-- Signin box section ends here -->
  • The topic ‘What is wrong with this code? I keep getting page not found’ is closed to new replies.