Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Alfraganus

  1. I was creating small online shop, but my products are staing in center, and not itimizing from the left to right, I dotn know whats wrong with it, I would be greatfull there would be solution, here is the situation in attachment, and let me give HTML and CSS codes HTML CODE <!DOCTYPE html> <?php include ("functions/functions.php"); ?> <html> <head> <title>my ecom web</title> <link rel="stylesheet" href="styles/style.css" media="all" /> </head> <body> <div class="main_wrapper"> <div class="header_wrapper"> <img id="logo" src="images/images.jpg"/> <img id="banner" src="images/sws_logo.gif" /> </div> <div class="menubar"> <ul id="menu"> <li><a href="#">home</a></li> <li><a href="#">all products</a></li> <li><a href="#">my account</a></li> <li><a href="#">shopping cart</a></li> <li><a href="#">contact us</a></li> </ul> <div id="form"> <form method="get" action="results.php" enctype="multipart/form-data"> <input type="text" name="user_query" placeholder="search a product" /> <input type="submit" name="search" value="Search"/> </form> </div> </div> <div class="content_wrapper"> <div id="sidebar"> <div id="sidebar_title">categories </div> <ul id="cats"> <?php getcats(); ?> </ul> <div id="sidebar_title">Brands </div> <ul id="cats"> <?php getBrands(); ?> </ul> </div> <div id="content_area"> <div id="products_box"> <?php getPro ();?> </div> </div> <div id="footer"> <h2 style="text-align:center; padding-top:30px;">©2015 by Alfraganus</h2> </div> </body> </html> ----CSS code---- body {background:skyblue;} .main_wrapper { width: 1000px; height: auto; margin: auto; } .header_wrapper { width: 1000px; height: 150px; margin: auto; } #logo {float:left; height: 150px;} #banner {float:right;} .menubar { width: 1000px; height: 50px; background:gray; color: white; } #menu { padding: 0; margin: 0; line-height: 35px; float: left; } #menu li { list-style: none; display: inline; } #menu a { text-decoration: none; color: white; padding: 8px; margin: 5px; font-size: 18px; font-family: COMIC SANS MS; } #menu a:hover { color: orange; font-weight: bolder; text-decoration: underline; } #form { float: right; padding-right:8px; line-height: 40px; } .content_wrapper { width: 1000px; margin: auto; background: pink; } #content_area { width:500px; float:left; background: pink; } #sidebar { width: 200px; background:black; float: left; } #sidebar_title { background-color: white; color: black; font-size: 22px; font-family: arial; padding:10px; text-align: center; } #cats { padding:0; text-align: left; } #cats li { list-style: none; text-align: left; margin: 5px; } #cats a { color: white; text-align: left; font-size: 22px; font-family: comic Sans MS; text-decoration: none; } #cats a:hover { color: orange; font-weight: bolder; text-decoration: underline; } #footer { width: 1000px; height: 100px; background: gray; clear: both; } #products_box { width: 780px; text-align: center; margin-left: 30px; margin-bottom: 10px; } #single_product { float: left; margin-left: 20px; padding: 10px; } index.php style.css insert_product.php functions.php db.php
  2. Alfraganus

    making online dictionary

    I would like to create online dictionary using PHP, MYSQL and AJAX or XML but the problem is that I don't know much how to create them, anyone knows any tutorial about creating dictionary and the codes?
  3. Alfraganus

    user log in

    I was trying to make log in using mysql too, however, something wring with my "mysql", I am not sure what I did wrong with it, could you please kindly check if there any possibility? login.php: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <form action="Login1.php" method="POST"> Username:<input type="text" name="username"> <br> Password:<input type="password" name="password"> <br> <input type="submit" name="submit" value="log in"> </form> </body> </html> login1.php <?php $username=$_POST ["username"]; $password=$_POST["password"]; if ($username&&$password) { $connect=mysqli_connect("locahost", "root","") or die("can't connect!!"); mysql_select_db("phplog") or die("cant connect!!"); } else die("please enter username and password"); ?>
  4. Alfraganus

    user log in

    but error exactly coming from line 9 which is $connect=mysql_connect("locahost", "root","") or die("can't connect!!"); what is wrong except mysqli?
  5. Alfraganus

    using DOT before variable

    dear bros, why we have to use "." (DOT) before and after every variable? for example: $color="green"; echo "my eyes' color is ".$color."; thank you for your attention.
  6. Alfraganus

    floating image in DIV

    hi programmers I was trying to float my image to left side of my page, but somehow my div element is disturbing it, it is stating in center of my page, is there any possibility to float image in DIV element?
  7. Alfraganus

    floating image in DIV

    Thank you for your reply, here is my begginning part of codes ----HTML---- <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>the Ottomon Empire</title> <link href="design.css" rel="stylesheet" type="text/css" media="screen"/> </head> <body> <header> <div class="headerContainer"> <h1><a href="">Usmonli Turklar Imperiyasi </a></h1> <div id="navcontainer"> <img src="images/ottomon.jpg"> (this is my picture that is not floating left) <ul id="navlist"> <li id="active"><a href="#">Usmonli Turklar Tarixi</a></li> <li> <a href="#">Imperiya yuksalishi </a></li> <li> <a href="#">Hukmdorlar</a></li> ---CSS--- body { background: url(images/bg.jpg) center center fixed no-repeat; -moz-background-size:cover; background-size: cover; } #header { border-bottom: 1px solid #c0dffb; padding-bottom: 30px; } .container { width: 960px; margin: 0 auto; } .headerContainer { width: 960px; margin: 0 auto; } header h1 { float: left; } header h1 a { font-family: 'lobster', sans-serif; font-size: 42px; color: #00adff; text-decoration: none; } img { float:left; margin: 0 0 10px 10px; width: 150px; height: 100px; overflow: auto; } #navcontainer { float: right; padding: 30px 0 0 0; } ul#navlist { margin-left: 0; padding-left: 0; white-space: nowrap; } #navlist li { display: inline; list-style-type: none; } #navlist a { padding: 10px 20px; font-size: 24px; font-family: 'lobster', sans-serif; text-decoration: none; color: #677a83; text-shadow:0px 0px, 1px 1 px #ffffff; } #navlist a:hover { color: #fff; text-decoration: none; text-shadow:none; background: #00adff; border-radius: 0px;