ifusion
Members-
Posts
21 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
ifusion's Achievements
Newbie (1/5)
0
Reputation
-
But if i do that then the whole image would have to load when i hover. Theres got to be an easier way.
-
Yea, and when i hover over the first link i want to include this: http://www.goome.co.nz/nav/round.png so that the link isnt square. But i cant add 2 images in one div?
-
Sorry heres the link: http://www.goome.co.nz/nav/
-
Hey, How do you add a round end on hover links. Heres my website. As you can see the first link on the left is round but when you hover over it it is square. HTML code: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Nav</title> <link rel="stylesheet" href="style.css" type="text/css"/> </head> <body> <div id="header"></div><div id="grey"></div> <div id="center"> <h3 class="small_red">Projects in Process:</h3> <div id="nav"> <li><a href="#">In-Process</a><img src="border.png" width="2" height="34" class="border" /></li> <li><a href="#">Completed</a><img src="border.png" width="2" height="34" class="border" /></li> <li><a href="#">All Projects</a><img src="border.png" width="2" height="34" class="border"/></li> <li><a href="website.zip">Download!</a><img src="border.png" width="2" height="34" class="border"/></li> </div> <p> You can download this website by clicking the download link above^ </div> </body> </html> CSS code: body { margin: 0px; padding: 0px; font-family: Verdana; font-size: 11px; color: #2f2f2f; } #center { margin: 0 auto; width: 900px; } #header { background: url('header2.png') repeat-x; width: 100%; height: 150px; } #grey { background: url('grey.png') repeat-x; width: 100%; height: 30px; border-top: 1px solid #fff; } #nav { width: 500px; height: 34px; background: url('back.png') no-repeat; width: 661px; height: 34px; display: block; } #nav li { list-style-type: none; display: inline; } #nav li a { font-family: Verdana; font-size: 11px; color: #484848; font-weight: bold; text-decoration: none; padding: 11px 10px 10px 10px; float: left; } #nav li a:hover { background: url('hover.png') repeat-x; color: #eeeeee; } img.border { margin: 0px; padding: 0px; float: left; } h3.small_red { font-family: Verdana; font-size: 11px; color: #f93737; }
-
[SOLVED] How to limit the number of login attempts in a login script?
ifusion replied to ifusion's topic in PHP Coding Help
Awsome! It works. Had to add a couple of things but it works now! Thanks heaps. -
[SOLVED] How to limit the number of login attempts in a login script?
ifusion replied to ifusion's topic in PHP Coding Help
Bump -
[SOLVED] How to limit the number of login attempts in a login script?
ifusion replied to ifusion's topic in PHP Coding Help
Hey, I cant work out how to implement the cookie code into my script. Heres my code for my pages below: Login page <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> <title>Login!</title> </head> <body> <div id="loginbox"> <form action="login2.php" method="post"> <label class="user" for="user"><strong>Username:</strong></label> <input type="text" name="username"><br><br> <label class="user" for="user"><strong>Password:</strong></label> <input type="password" name="password"><br><br> <input class="submit" type="submit" name="submit" value="Login!" id="submitbut" > </form> </div> <div id="underbox"><a class="reg" href="register.php">Register!</a><span class="text">Created by Kieran P</span></div> </body> </html> Login Check <?php //Includes the connection file that contains the MYSQL database information include('connection.php'); // Checking if the submit button has been checked. if(isset($_POST['submit'])){ // If the username and password fields are empty then print and error. if(empty($_POST['username']) || empty($_POST['password'])){ echo "Sorry you have to fill in all the forms!"; exit; } $user = $_POST['username']; $pass = $_POST['password']; $pass = md5($pass); if(strlen($user) > '15') { echo "Your username is more than 15 characters. It needs to be less than 15."; exit; } // Selects the username and password from the users database. $query = "SELECT username, password FROM `users` WHERE username='$user'"; $result = mysql_query($query); if(!$result) { echo "The query failed " . mysql_error(); } else { // If the row vairble does not equal the pass variable then an error occurs. $row = mysql_fetch_object($result); if($row->password != $pass) { echo "I'm sorry, but your username and password don't match. Please go back and enter the correct login details. You Click <a href=\"login.php\">here</a> to try again."; exit; } header('Location: logged.php'); } } ?> I need to implement this code into the the script above <?php if($login_incorrect){ if(isset($_COOKIE['login'])){ if($_COOKIE['login'] < 3){ $attempts = $_COOKIE['login'] + 1; setcookie('login', $attempts, time()+60*10); //set the cookie for 10 minutes with the number of attempts stored } else{ echo 'You are banned for 10 minutes. Try again later'; } } else{ setcookie('login', 1, time()+60*10); //set the cookie for 10 minutes with the initial value of 1 } } ?> -
[SOLVED] How to limit the number of login attempts in a login script?
ifusion replied to ifusion's topic in PHP Coding Help
Cheers for that man. Is there anyway of making it in a loop form? Like a for or while loop? -
[SOLVED] While Loop not returning the first row?
ifusion replied to ifusion's topic in PHP Coding Help
Awsome dude, I had the $row = mysql_fetch_array($result) in a included file. Cheers man. -
Hey, My while loop isn't returning the first row, only the second and third rows of data etc? Why is that and how do i fix it? <?php while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>". $row['invoice_date']. "</td>"; echo "<td>". $row['due_in']. " days". "</td>"; echo "<td>". $row['invoice_id']. "</td>"; echo "<td>". $row['client_name']. "</td>"; echo "<td align=\"right\">"."$". $row['amount_due']. "</td>"; echo "</tr>"; } ?> Cheers, Fusion.
-
It depends on what site you have but 3mins is very short imo. A minimum of 10 mins would be better.
-
[SOLVED] How to add paragraphs when display data in PHP?
ifusion replied to ifusion's topic in PHP Coding Help
Beautiful. Cheers m8! -
Hi there, I'm wanting to post information from a textarea, then if the user has added a break or paragraph in that info then have it display the same as how they wrote it in the form. For example: If the user writes this. Theres 2 spaces. If i echo that out with the code below it would echo out as one whole paragraph. Heres my code: <html> <head></head> <body> <form action="send.php" method="post"> <textarea name="info" rows="8" cols="40"></textarea><br> </form> </body> </html> PHP: <?php $info = $_POST['info']; echo $info; ?>
-
Your a legend mate! Cheers!