Jump to content

andrew6607

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by andrew6607

  1. Hello, I am currently trying to design my website with a dropdown menu. But, i am running into a slight problem with the allignment. I want the menu to allign to the center, but i can't get it to do that for some reason. I'm sure it will be a simple fix. Any help is welcome! Code is Below: style.css @charset "utf-8"; /* CSS Document */ html body{ margin:0; padding:0; vertical-align:middle; background-color:#CCC; } #header{ margin:auto; width:800px; } #navMenu{ margin:0; padding:0; } #navMenu ul{ margin:0; padding:0; line-height:30px; } #navMenu li{ margin:0; padding:0; list-style:none; float:left; position:relative; background:url(redBG.png); } #navMenu ul li a{ text-align:center; font-family:"MS Serif", "New York", serif; text-decoration:none; height:30px; width:100px; display:block; color:#FFF; } #navMenu ul ul{ position:absolute; visibility:hidden; top:30px; } #navMenu ul li:hover ul{ visibility:visible; background:#000; } #navMenu li:hover{ background:url(redBGOver.png); color:#FFF; } #navMenu ul li:hover ul li a:hover{ background:#CCC; color:#000; } #navMenu a:hover{ color:#000; } #navMenu ul li:hover ul li a{ background:#000; border:1px solid #FFF; } index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> <title>Andrew Erhardt - Blog and Portfolio</title> </head> <body> <div id="header"> <img src="images/header.png" /> </div> <div id="navMenu"> <ul> <li><a href="#">Home</a> <ul> </ul><!-- End Inner UL Tag --> </li><!-- End Main LI Tag --> <li><a href="#">About Me</a> <ul> </ul><!-- End Inner UL Tag --> </li><!-- End Main LI Tag --> <li><a href="#">Portfolio</a> <ul> <li><a href="#">Websites</a></li> <li><a href="#">Photos</a></li> <li><a href="#">Programs</a></li> </ul><!-- End Inner UL Tag --> </li><!-- End Main LI Tag --> <li><a href="#">Live Show</a> <ul> <li><a href="#">Show Page</a></li> <li><a href="#">Pre-Recorded</a></li> <li><a href="#">Chat Rules</a></li> </ul><!-- End Inner UL Tag --> </li><!-- End Main LI Tag --> </ul><!-- End Main UL Tag --> </div> </body> </html> A screenshot of the website i'm working on, is attached, to help give you a better idea of what i'm trying to explain. [attachment deleted by admin]
  2. Yea i know about the query. But how would i add the hours to the table. Thats What IM Wondering!
  3. The Questions is.. How Would i get the 2.8 Hours into the database so it would equal 202.8?
  4. Hello, I am trying to set up a System For A Virtual Airline. When someone enters the amount of hours they did on a flight and then it ads it to the currents hours in the database. Example.. They currently have 200 Hours logged. And They submit a report with 2.8 Hours. So then the table would be updated and then say they have 202.8 Hours. Thanks!
  5. Yea sorry, It will be inside a MySQL DB
  6. Hello, I need some help here. Im trying to get it when a user signs up and a Admin Approves the application. I want a ID to be assigned Starting at 100. Please Help!!
  7. Hello there, I am currently designing a site template using tables. But i keep running into a problem. When i enter text it all go's in one line. Insted of breaking. Look at this link for what im talking about. http://i268.photobucket.com/albums/jj36/pilotman5545/help.png See what i mean. it resized Please Help!! Here is the HTML Code! <table border="0" align="center" height="5" bgcolor="#0000FF"> <tr> <td width="1000" height="5"></td> </tr> </table> <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="0000FF"> <tr> <td width="25" height="25" background="images/top_left_corner.jpg"></td> <td width="600" height="25" background="images/top.jpg"></td> <td width="25" height="25" background="images/top_right_corner.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="25" background="images/top_left_corner.jpg"></td> <td width="200" height="25" background="images/top.jpg"></td> <td width="25" height="25" background="images/top_right_corner.jpg"></td> </tr> <tr> <td width="25" height="100" background="images/left.jpg"></td> <td width="600" height="100"></td> <td width="25" height="100" background="images/right.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="100" background="images/left.jpg"></td> <td width="200" height="100"></td> <td width="25" height="100" background="images/right.jpg"></td> </tr> <tr> <td width="25" height="25" background="images/bottom_left_corner.jpg"></td> <td width="600" height="25" background="images/bottom.jpg"></td> <td width="25" height="25" background="images/bottom_right_corner.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="25" background="images/bottom_left_corner.jpg"></td> <td width="100" height="25" background="images/bottom.jpg"></td> <td width="25" height="25" background="images/bottom_right_corner.jpg"></td> </tr> </table> <table border="0" align="center" width="925" height="5"> <tr> <td width="1000" height="5"></td> </tr> </table> <table border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="0000FF"> <tr> <td width="25" height="25" background="images/top_left_corner.jpg"></td> <td width="600" height="25" background="images/top.jpg"></td> <td width="25" height="25" background="images/top_right_corner.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="25" background="images/top_left_corner.jpg"></td> <td width="200" height="25" background="images/top.jpg"></td> <td width="25" height="25" background="images/top_right_corner.jpg"></td> </tr> <tr> <td width="25" height="100" background="images/left.jpg"></td> <td width="600" height="100"></td> <td width="25" height="100" background="images/right.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="100" background="images/left.jpg"></td> <td width="200" height="100"></td> <td width="25" height="100" background="images/right.jpg"></td> </tr> <tr> <td width="25" height="25" background="images/bottom_left_corner.jpg"></td> <td width="600" height="25" background="images/bottom.jpg"></td> <td width="25" height="25" background="images/bottom_right_corner.jpg"></td> <td width="25" bgcolor="#0000FF"></td> <td width="25" height="25" background="images/bottom_left_corner.jpg"></td> <td width="100" height="25" background="images/bottom.jpg"></td> <td width="25" height="25" background="images/bottom_right_corner.jpg"></td> </tr> </table>
  8. Hello, I can not figure out how to fix this problem. I am trying to get data from mysql. I have 3 records in the table but it will only display one. Below is the code. <?php $Host = "localhost"; $User = "root"; $Password = "******"; $DBName = "website"; $TableName = "members"; $Conn = mysql_connect ($Host, $User, $Password) or die ( "MySQL Error!" ); //now lets do the query $Query = "SELECT * from $TableName"; $Result = mysql_db_query ($DBName, $Query, $Conn) or die ( "MySQL Error 2!" ); $data=mysql_fetch_assoc($Result); ?> <table border="1" align="center"> <tr> <td>First Name</td><td>Last Name</td><td>Email</td><td>User Level</td><td>Delete</td><td>Edit User</td> </tr> <tr> <td><?php echo $data['fname']; ?></td><td><?php echo $data['lname']; ?></td><td><?php echo $data['email']; ?></td><td><?php echo $data['level']; ?></td><td><a href="delete.php?fname=<?php echo $data['fname']; ?>">Delete User</a></td><td><a href="edit.php?fname=<?php echo $data['fname']; ?>">Edit User</a></td> </tr> </table> Thank you ahead of time!
  9. Cant Get This To Get Info From The Database!! <?php $Host = "localhost"; $User = "****"; $Password = "*******"; $DBName = "news"; $TableName = "news"; $Conn = mysql_connect ($Host, $User, $Password) or die ( "MySQL Error!" ); //now lets do the query $Query = "SELECT * from $TableName"; $Result = mysql_db_query ($DBName, $Query, $Conn) or die ( "MySQL Error 2!" ); print ("$Result[content]"); ?> There Are NO Errors Displayed On The Page!
  10. Hello, I have been Spending Almost A Hour Trying to Figure This Out. I have solved it before but i cant figure out how i did it. Please HELP!! Here is the error it gives: Now Here Is The PHP CODE: <?php include( 'includes/config.php' ); //Get Data From Forum $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $username = $_POST['username']; $password = $_POST['password']; $cpassword = $_POST['cpassword']; //Validate Info if( $fname == false || $lname == false || $email == false || $username == false || $password == false ) { echo "Please Fill Out All The Feilds!!"; } if( $password == $cpassword ) { $link = mysql_connect( $db_host, $db_username, $db_password ); if( ! $link ) { die ( "MySQL Said: ".mysql_error() ); } $db = mysql_select_db( $db_database, $link ); if( ! $db ) { die ("MySQL Said: ".mysql_error() ); } $query = "INSERT *INTO new_members ( fname, lname, email, username, password ) values( '$fname', '$lname', '$email', '$username', '$password' )"; mysql_query( $query, $link ) or die ( "MySQL Said: ".mysql_error() ); mysql_close( $link ); }else{ echo "Your Passwords Dont Match"; } ?> Thanks!! Andrew E
  11. :P OOps why didnt i see that thanks alot! :-\
  12. Ok it fixed that line. Now I cant figure out. Whats its yelliing about now! or die( "MySQL Said: ". mysql_error() ); > >
  13. Hello I cant Figure Out What is Going On here. Below is my code. I am Writing a Login System. <?php require_once('includes/config.php'); mysql_connect( $db_host, $db_username, $db_password or die( "MySQL Said: ". mysql_error() ) mysql_select_db( $db_database ) or die( "MySQL Said: ". mysql_error() ); $username = $_POST['username']; $password = $_POST['password']; $sql = "SELECT * FROM $table WHERE username='$username' and password='$password'"; $result = mysql_query( $sql ); $count = mysql_num_rows( $result ); if( $count==1){ session_register('username'); session_register('password'); header( 'location:memberarea.php' ); }else{ echo 'Sorry We Were Not Able to Log you in. Either Your Username or Password is wrong. Or Their is a major error in this system'; } ?> And the Error its gives is ??? ??? ??? ??? Thanks Ahead Of Time!!
  14. PHP Version: 5 Mysql Version 5 Error: INSERT error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' , , , , , )' at line 2 Here is the code im using. <?php $fname = $_POST['fname']; $lname = $_POST['lname']; $email = $_POST['email']; $positon = $_POST['positon']; $exp = $_POST['exp']; $username = $_POST['username']; $password = $_POST['password']; $user = "root"; $pass = "##########"; $db = "#########"; $table = "#########"; $link = mysql_connect( "localhost", $user, $pass ); if ( ! $link ) { die( "Couldn't connect to the MySQL Server: ".mysql_error() ); } mysql_select_db( $db ) or die ( "Couldn't open $db: ".mysql_error() ); $query = "INSERT INTO staff( fname, lname, email, positon, exp, username, password ) values( $fname, $lname, $email, $positon, $exp, $username, $password )"; mysql_query( $query, $link ) or die ( "INSERT error: ".mysql_error() ); mysql_close( $link ); ?>
  15. Nope I dont know whats going on ill send ya the code of the script <?php $usernamea=$_POST['username']; $title=$usernamea; ?> <title> Welcome <?php echo $title; ?>! </title> <?php include_once("includes/config.php"); mysql_select_db($data,$connect) or die ("Cannot Connect to Database Server"); $username=$_POST['username']; $password=$_POST['password']; // Connections $sql="SELECT * FROM users WHERE username='$username' && password='$password'"; $query=mysql_query($sql); $row=mysql_fetch_assoc($query); $totalRow=mysql_num_rows($query); // If username is correct if ($username = $row['username']) { // If password is correct if ($password = $row['password']) { ?> <?php session_start(); session_register('user_id'); // store session data $_SESSION['username']; //retrieve session data echo "Welcome". $_SESSION['username']; ?> <?php } else { echo "Password is Incorrect! <a href='index.php'>Try Again</a>"; } } else { echo "Wrong Password or the User does not exist! <a href='index.php'>Try Again</a>"; } mysql_free_result($query); ?>
  16. Hello im getting a error with sessions here it is Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\newsite\member.php:6) in C:\xampp\htdocs\newsite\member.php on line 24 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\newsite\member.php:6) in C:\xampp\htdocs\newsite\member.php on line 24 Welcome And here is the code im using <?php session_start(); // store session data $_SESSION['username']; ?> <?php //retrieve session data echo "Welcome". $_SESSION['username']; ?> PLEASE HELP!!
×
×
  • 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.