l3vi
05-27-2003, 01:46 AM
I know that I have cookies turned on in my browser... at least I think I do:rolleyes:. But, here is my code for my login script(right now its not really a login script:o, but just something where u enter in a username and it will "Log" you in with that username and password):
LOGIN.php
<?php
if (isset($_POST['logincheck'])){
?>
<center>
Username: <?=$_POST['uname']?><br>
Password: <?=$_POST['pword']?><br>
<input type="submit" value="Login" name="login" class="searchl" style="background-image:url('/Main/LIL/no.jpg');" onClick="this.style.background='url(Main/LIL/in.php)';"><br>
</center>
<?
} else {
?>
<center>
<form method=POST action="index.php?type=login">
Login Name: <input type="text" name="uname"><br>
Password: <input type="password" name="pword"><br>
<input type="submit" value="Check" name="logincheck" class="search" style="filter:chroma(color:white);">
</center>
</form>
<?
}
?>
Another page where all the styles are, that login.php is included in
<style type="text/css">
.search{
background-image:url('Main/LIL/smt.jpg');
background-repeat:no-repeat;
width:75;
height:26;
border:medium none;
text-transform:uppercase;
font-size:8px;
font-family:Small Fonts;
text-indent:0px;
}
.searchl{
background-repeat:no-repeat;
width:75;
height:26;
border:medium none;
text-transform:uppercase;
font-size:8px;
font-family:Small Fonts;
text-indent:0px;
}
</style>
in.php
<?php
SetCookie ("Username", $_REQUEST['uname']);
SetCookie ("Password", $_REQUEST['pword']);
SetCookie ("in", "yes");
Header("Location: in_img.php") ;
?>
in_img.php
<?php
Header("Content-type: image/jpeg");
$im = imagecreatefromjpeg("yes.jpg");
Imagejpeg($im,'',200);
ImageDestroy($im);
?>
Any help?:confused:? :confused: ?:confused: ?:confused: ?
LOGIN.php
<?php
if (isset($_POST['logincheck'])){
?>
<center>
Username: <?=$_POST['uname']?><br>
Password: <?=$_POST['pword']?><br>
<input type="submit" value="Login" name="login" class="searchl" style="background-image:url('/Main/LIL/no.jpg');" onClick="this.style.background='url(Main/LIL/in.php)';"><br>
</center>
<?
} else {
?>
<center>
<form method=POST action="index.php?type=login">
Login Name: <input type="text" name="uname"><br>
Password: <input type="password" name="pword"><br>
<input type="submit" value="Check" name="logincheck" class="search" style="filter:chroma(color:white);">
</center>
</form>
<?
}
?>
Another page where all the styles are, that login.php is included in
<style type="text/css">
.search{
background-image:url('Main/LIL/smt.jpg');
background-repeat:no-repeat;
width:75;
height:26;
border:medium none;
text-transform:uppercase;
font-size:8px;
font-family:Small Fonts;
text-indent:0px;
}
.searchl{
background-repeat:no-repeat;
width:75;
height:26;
border:medium none;
text-transform:uppercase;
font-size:8px;
font-family:Small Fonts;
text-indent:0px;
}
</style>
in.php
<?php
SetCookie ("Username", $_REQUEST['uname']);
SetCookie ("Password", $_REQUEST['pword']);
SetCookie ("in", "yes");
Header("Location: in_img.php") ;
?>
in_img.php
<?php
Header("Content-type: image/jpeg");
$im = imagecreatefromjpeg("yes.jpg");
Imagejpeg($im,'',200);
ImageDestroy($im);
?>
Any help?:confused:? :confused: ?:confused: ?:confused: ?