Jump to content

ifusion

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ifusion's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. But if i do that then the whole image would have to load when i hover. Theres got to be an easier way.
  2. 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?
  3. Sorry heres the link: http://www.goome.co.nz/nav/
  4. 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; }
  5. Awsome! It works. Had to add a couple of things but it works now! Thanks heaps.
  6. 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 } } ?>
  7. Cheers for that man. Is there anyway of making it in a loop form? Like a for or while loop?
  8. Hey, I've written a very basic php login script but my problem is i cant work out how to limit the user so they can only try and log in 3 times. And after 3 times then ban them for 10mins? I just need something basic. Should be easy for and expert Cheers!
  9. Awsome dude, I had the $row = mysql_fetch_array($result) in a included file. Cheers man.
  10. 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.
  11. It depends on what site you have but 3mins is very short imo. A minimum of 10 mins would be better.
  12. 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; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.