squiblo
Members-
Posts
483 -
Joined
-
Last visited
-
Days Won
2
Everything posted by squiblo
-
i could not find the correct place to post this script, anyway, when i change my doctype to: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> the line spacing and other things are different in IE, i need this doctype becuase i have css codes in my pages, how can i change this?
-
i fixed it by changing the doctype to strict
-
Drop down menu works in all browsers but not Internet Explorer: <div id="apps" style="position:absolute;left:754px;top:169px;z-index:14" align="center"> <style> ul.cssMenu ul{display:none} ul.cssMenu li:hover>ul{display:block} ul.cssMenu ul{position: absolute;left:-1px;top:98%;} ul.cssMenu ul ul{position: absolute;left:98%;top:-2px;} ul.cssMenu,ul.cssMenu ul { margin:0px; list-style:none; padding:0px 2px 2px 0px; background-color:#ffffff; background-repeat:repeat; border-color:#AAAAAA; border-width:1px; border-style:solid; } ul.cssMenu table {border-collapse:collapse}ul.cssMenu { display:block; zoom:1; float: left; } ul.cssMenu ul{ width:64.05px; } ul.cssMenu li{ display:block; margin:2px 0px 0px 2px; font-size:0px; } ul.cssMenu a:active, ul.cssMenu a:focus { outline-style:none; } ul.cssMenu a, ul.cssMenu li.dis a:hover, ul.cssMenu li.sep a:hover { display:block; vertical-align:middle; background-color:#ffffff; border-width:0px; border-color:#6655ff; border-style:solid; text-align:left; text-decoration:none; padding:4px; _padding-left:0; font:normal 11px Verdana; color: #444444; text-decoration:none; cursor:default; } ul.cssMenu span{ overflow:hidden; } ul.cssMenu li { float:left; } ul.cssMenu ul li { float:none; } ul.cssMenu ul a { text-align:left; white-space:nowrap; } ul.cssMenu li.sep{ text-align:center; padding:0px; line-height:0; height:100%; } ul.cssMenu li.sep span{ float:none; padding-right:0; width:5; height:16; display:inline-block; background-color:#AAAAAA; background-image:none;} ul.cssMenu ul li.sep span{ width:80%; height:3; } ul.cssMenu li:hover{ position:relative; } ul.cssMenu li:hover>a{ background-color:#4792E6; border-color:#665500; border-style:solid; font:normal 11px Verdana; color: #ffffff; text-decoration:none; } ul.cssMenu li a:hover{ position:relative; background-color:#4792E6; border-color:#665500; border-style:solid; font:normal 11px Verdana; color: #ffffff; text-decoration:none; } ul.cssMenu li.dis a { color: #AAAAAA !important; } ul.cssMenu img {border: none;float:left;_float:none;margin-right:4px;width:16px; height:16px; } ul.cssMenu ul img {width:16px; height:16px; } ul.cssMenu img.over{display:none} ul.cssMenu li.dis a:hover img.over{display:none !important} ul.cssMenu li.dis a:hover img.def {display:inline !important} ul.cssMenu li:hover > a img.def {display:none} ul.cssMenu li:hover > a img.over {display:inline} ul.cssMenu a:hover img.over,ul.cssMenu a:hover ul img.def,ul.cssMenu a:hover a:hover img.over{display:inline} ul.cssMenu a:hover img.def,ul.cssMenu a:hover ul img.over,ul.cssMenu a:hover a:hover img.def{display:none} ul.cssMenu a:hover ul{display:block} ul.cssMenu span{ display:block; background-image:url(http://squiblo.com/Images/arrv_anim_1.gif); background-position:right center; background-repeat: no-repeat; padding-right:11px;} ul.cssMenu li:hover>a>span{ background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif); } ul.cssMenu a:hover span{ _background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif)} ul.cssMenu ul span,ul.cssMenu a:hover table span{background-image:url(http://squiblo.com/Images/arr_double_1.gif)} ul.cssMenu ul li:hover > a span{ background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif);} ul.cssMenu table a:hover span{background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif)} </style> <ul class="cssMenu cssMenum"> <li class=" cssMenui"><a class=" cssMenui" href="#"><span>Accessories</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class=" cssMenum"> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Music</a></li> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Chat</a></li> <li class=" cssMenui"><a class=" cssMenui" href="/games.php">Games</a></li> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Radio</a></li> <li class=" cssMenui"><a class=" cssMenui" href="/applications.php">Other</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> </ul> doctype: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
i tried something different but there is an error i cant seem to do this with text: <div id="copyright" style="position:absolute;left:55px;top:628px;width:150px;height:44px;z-index:32" align="left"> <?php if(isset($_SESSION['myusername'])) echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009'; ?> </font></div> <div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left"> <?php { else } ?> echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009'; </font></div> <?php } ?>
-
<?php echo '<div id="wb_Shape2" style="position:absolute;left:54px;width:793px;height:412px;z-index:10;'; if(isset($_SESSION['myusername'])) { echo 'top:200px;'; } else { echo 'top:170px;'; } echo '" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div>'; ?> <div id="menubar" style="position:absolute;left:54px;top:168px;width:793px;height:30px;z-index:13" align="center"> <?php if(isset($_SESSION['myusername'])) echo '<img src="/Images/header_img.jpg" id="menubar" align="top" alt="" title="" border="0" width="793" height="30">'; ?> </div>
-
basically i wont to move this text 30px from top if logged in: <div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left"> <font style="font-size:13px" color="#000000" face="Arial">Squiblo © 2009</font></div>
-
i have session_start(); at the top of the page but i dont know how to correct what i have done
-
now the script doesnt have any errors but does not do what i want, i want to move the text 30px from the top when logged in
-
i think that i have my thinking all wrong: <?php echo '<div id="copyright" style="position:absolute;left:55px;width:150px;height:44px;z-index:32">'; if(isset($_SESSION['myusername'])) { echo 'top:628px;'; } else { echo 'top:588px;'; } echo '" align="left"> <font style="font-size:13px" color="#000000" face="Arial">Squiblo © 2009</font></div>'; ?> <div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left"> <?php if(isset($_SESSION['myusername'])) echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo © 2009>'; ?> </font></div>
-
i know that for this it will look some thing like <?php session_start(); if(!isset($_SESSION['myusername'])){ [/code but i dont know how i could move a picture
-
<div id="wb_Shape2" style="position:absolute;left:54px;top:170px;width:793px;height:412px;z-index:10" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div> this is my image that i wont moving 34px from the top if someone is logged in, i have not got to learn any css yet
-
ok my aim is to move a certain picture 34px from the top if they are logged in how do i go about doing this?
-
cant log in and it takes me to notloggedin.php
-
when i try to login, it redirects me to notloggedin.php
-
it is getting closer, when you are not logged in it show the login form, when u are logged in it shows, "you are logged in as:". but without the username from the database.
-
view the page now, echo is echoed.
-
there is an error in the script, not sure what line
-
checklogin.php: <?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); if(isset($_POST['Login'])){ // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $_SESSION['myusername']=$dbusername; $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "profile.php" $_SESSION['myusername'] = $myusername; header("location:profile.php"); } else { header("location: http://www.squiblo.com/retrylogin.php"); } } ?> about.php: <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Squiblo - About Us!</title> <style type="text/css"> div#container { width: 900px; position: relative; margin-top: 0px; margin-left: auto; margin-right: auto; text-align: left; } body { text-align: center; margin: 0; } </style> </head> <body bgcolor="#E6E6E6" text="#000000"> <div id="container"> <div id="wb_Shape1" style="position:absolute;left:55px;top:41px;width:792px;height:125px;z-index:2" align="center"> <img src="/Images/header_img.jpg" id="Shape1" align="top" alt="" title="" border="0" width="792" height="125"></div> <div id="wb_Text1" style="position:absolute;left:60px;top:85px;width:325px;height:72px;z-index:3" align="left"> <font style="font-size:70px" color="#FFFFFF" face="impact"><a href="/index.php" style="text-decoration:none"> <font color="#FFFFFF">SQUIBLO</a></font></font></div> <div id="wb_Shape2" style="position:absolute;left:54px;top:170px;width:793px;height:412px;z-index:10" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div> <?php if(isset($_POST['Login'])){ ?> echo<div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> </font></div> <?php ucwords(strtolower($_SESSION['myusername'])); } else { ?> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?> <div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left"> <font style="font-size:13px" color="#000000" face="Arial">Squiblo © 2009</font></div> <div id="about" style="position:absolute;left:185px;top:588px;width:150px;height:44px;z-index:33" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/about.php"><font color=#000000>About Us</font></a></font></div> <div id="terms" style="position:absolute;left:285px;top:588px;width:150px;height:44px;z-index:34" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/terms.php"><font color=#000000>Terms and Conditions</font></a></font></div> <div id="contact" style="position:absolute;left:450px;top:588px;width:150px;height:44px;z-index:35" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/contact.php"><font color=#000000>Contact Us</font></a></font></div> <div id="privacy" style="position:absolute;left:555px;top:588px;width:150px;height:44px;z-index:36" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/privacy.php"><font color=#000000>Privacy</font></a></font></div> <div id="help" style="position:absolute;left:640px;top:588px;width:150px;height:44px;z-index:36" align="left"> <font style="font-size:13px" color="#000000" face="Arial"><a href="/help.php"><font color=#000000>Help</font></a></font></div> </div> </body> </html>
-
after changing check login to: $_SESSION['myusername'] = $myusername; i can login just like normal but on the about.php page the login form is still visable on the page if logged in or logged out, maybe going about it a different way and using include may help, although ive never used include
-
after changing the checklogin.php and putting in: $_SESSION['myusername']; i cant loggin.
-
<?php $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); if(isset($_POST['Login'])){ // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $_SESSION['myusername']=$dbusername; $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "profile.php" session_register("myusername"); session_register("mypassword"); header("location:profile.php"); } else { header("location: http://www.squiblo.com/retrylogin.php"); } } ?>
-
this always shows the login form both logged in and not logged in: <?php if(isset($_POST['Login'])){ $_SESSION['myusername'] = $_POST['myusername']; $username = $_SESSION['myusername']; echo ucwords(strtolower($username)); ?> <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> </font></div> <?php } else { ?> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:66px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:91px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:116px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:134px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?>
-
http://www.squiblo.com/about.php this is what is shown when u are not logged in, the same thing is also show when logged in
-
ok basically my aim is to show the login form if the person is not logged in, and if the person is logged in i want it to show "you are logged in as: (username)" but what i am experience is that when i log in it shows "you are logged in as:(username)" just like it is supposed to, but when i am not logged in, it does not show the login form for me to login, and what it actually shows is "you are logged in:" but without the username at the end.
-
when im not logged in it is not showing the login form