I'm new to this forum and I was looking for One to solve my problems on coding
I have 4 questions any help will be regarded
1.I have a mysql db and I have some news on it with (id INT NOT NULL AUTO_INCREMENT,) I want to show headlines on a page limited, I mean for example 20 headlines per page how I can do this?
(I used limit 1,30 command on mysql query but it just give 2 headlines!?!)
2.how I can open a small window while clicking on a page I tried many but they all give me another maximized page
3.Is the below code secure?
Code: Select all
require("sec.php"); //including user pass
if(!$PHP_AUTH_USER || !$PHP_AUTH_PW){
header("WWW-Authenticate: Basic Realm=\"news Admin\"");
header("HTTP/1.0 401 Unauthorized");
$title = "Authorization Required";
include("header.php");
echo " Authorization is required.";
include("footer.php");
exit;
}
else{
if($PHP_AUTH_USER != $admin && $PHP_AUTH_PW != $pass){ # Set your username and password here
$title = "Incorrect Login";
include("header.php");
echo " Incorrect Login.";
include("footer.php");
exit;
}
}with thanks
Sarah