Jump to content
Killersites Forums

zeusthegreat

Member
  • Content Count

    86
  • Joined

  • Last visited

Everything posted by zeusthegreat

  1. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Web Form Design and Development :: Lesson 8</title> <meta name="description" content="A Tuts+ Course"> <meta name="author" content="Adi Purdila"> <!-- Stylesheets --> <link rel="stylesheet" href="css/normalize.css" /> <link rel="stylesheet" href="css/styles.css" /> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <h
  2. I have done some checking and London is GMT +1 I thought it was 0 getlang "eng" ,"ISO-8859-1" , "+1" still cannot get it to work though weird I have done this before with no probs any detailed accounts please
  3. time.php <?php include("conf.php"); function getlang($language, $charset) { global $lang; global $diff; global $char; if (!isset($lang) || empty($lang) || $lang == "false") { $found_lang[0] = strtolower(substr($language,0,3)) . '_' . strtoupper(substr($language,0,3)); $found_lang[1] = strtolower(substr($language,0,3)) . '-' . strtoupper(substr($language,0,3)); $found_lang[2] = strtolower(substr($language,0,2)) . '_' . strtoupper(substr($language,0,2)); $found_lang[3] = strtolower(substr($language,0,2)) . '-' . strtoupper(sub
  4. I have two pages an index page and a product page on the index page the id and all the other parts i wish to echo out return to the page I just wondered if i did this right I had my first image and i saved it to a folder called inventory_images and i saved is as 1 (did i do this right ) I can get this image out to the page when i view it through localhost and all the other data i wish to return on the index page when i try to return my data and picy on the product page i get No product in the database with thatID ( now this indicates that there is no item with that
  5. No product in the database with that ID but i have a product in my database with the id of 1 (only 1 product so far). so i thought i had not echoed my product id out at all.
  6. index.php first of all with this page been over four times my head hurts! <?php //error reporting error_reporting(E_ALL); ini_set('display_errors', '1'); ?> <?php //run a select query to get my latest six items //Connect to the MySQL database if they do have a session variable set yp you do not exit the script you allow the script to keep running include "storescripts/connect_to_mysql.php"; // include the database connection file so you link to your database $dynamicList = ""; $sql = mysql_query("SELECT * FROM products Order By date_added Desc LIMIT 6"); $product
  7. hello have a page called inventory_list.php i am not happy as i think the prob is to do with the date added part of my code <?php session_start(); /* this starts a session and is necssary if you want to work with session cookies they help you have pessitent data*/ if(!isset($_SESSION["manager"])){ /* if is not set session manger, in other words if they come to the admin index and they are not logged in they will be ushered to the admin login page*/ header("location: admin_login.php"); /*if you happen not be logged in then uou will be sent to the admin login section*/
  8. sorry for being a pain all i did to resolve was i created another db with a username and password and it worked but thanks anyway everyone
  9. I am using dreamweaver installation help « on: Today at 10:10:08 AM » Quote Modify all i am doing is producing a database on my local machine i have named my database in phpmyadmin and linked (created) a user for it in the privaleges section also highlighting a password for the user then i have a connect_to_mysql.php script <?php /* 1: "die()" will exit the script and show an error statement if something goes wrong with the "connect" or "select" functions. 2: A "mysql_connect()" error usually means your username/password
  10. I am using dreamweaver installation help « on: Today at 10:10:08 AM » Quote Modify all i am doing is producing a database on my local machine i have named my database in phpmyadmin and linked (created) a user for it in the privaleges section also highlighting a password for the user then i have a connect_to_mysql.php script <?php /* 1: "die()" will exit the script and show an error statement if something goes wrong with the "connect" or "select" functions. 2: A "mysql_connect()" error usually means your username/passwo
  11. index.php ?php error_reporting(E_ALL); ini_set('display_errors', '1'); ?> <?php // Run a select query to get my latest 6 items //Connect to the MySQL database include "storescripts/connect_to_mysql.php"; $dynamicList = ""; $sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC LIMIT 6"); $productCount = mysql_num_rows($sql);//count the the output ammount if ($productCount > 0){ while($row = mysql_fetch_array($sql)){ $id = $row["id"]; $price = $row["price"]; $details = $row["details"]; $product_nam
  12. I have a index page <?php // Run a select query to get my latest 6 items //Connect to the MySQL database include "storescripts/connect_to_mysql.php"; $dynamicList = ""; $sql = mysql_query("SELECT * FROM products ORDER BY date_added DESC LIMIT 6"); $productCount = mysql_num_rows($sql);//count the the output ammount if ($productCount > 0){ while($row = mysql_fetch_array($sql)){ $id = $row["id"]; $price = $row["price"]; $details = $row["details"]; $product_name = $row["product_name"]; $date_added = strftime("%b %d, %Y", strtotim
  13. i have been trying for a while now to set up a database system with a few products in it while trialing my pages i have been editing deleting items just to check that my admin system works fine now i have deleted so many items in my database that the first item showing although i had deleted the other items, shows item 24 as really being my first item in my database can i reset something in my database as it still thinks i have 24 items in my database where i have only 1 item thanks in advance
  14. sorted it but thanks antway!
  15. http://localhost/myNewweb/storeadmin/inventory_edit.phppid=20 this is the only help i can offer as there is no page error every time i try to edit my inventory it returns a blank page <?php session_start(); if (!isset($_SESSION["manager"])) { header("location: admin_login.php"); exit(); } // Be sure to check that this manager SESSION value is in fact in the database $managerID = preg_replace('#[^0-9]#i', '', $_SESSION["id"]); // filter everything but numbers and letters $manager = preg_replace('#[^A-Za-z0-9]#i', '', $_SESSION["manager"]); // filter everyt
  16. I have resolved this guys and tryed to find a delete button but no joy!
  17. when i place a product in my db with all its details and click upload the item loads to the database and arrives a a http 404 page not found. but the page does not deliever back to the inventory form but instead goes to a http 404 not found, does this mean i have not linked my inventory page when item uploaded,to arrive back at my inventory page to see that the details are there. here is the code <?php session_start(); if(!isset($_SESSION["manager"])){ header("location: admin_login.php"); exit(); } // Be sure to check that this manager SESSION value is in fact
  18. can somebody just give me there knowledge please thanks in advance!
  19. have too pages an inventory_list <?php session_start(); if(!isset($_SESSION["manager"])){ header("location: admin_login.php"); exit(); } // Be sure to check that this manager SESSION value is in fact in the database $managerID = preg_replace('#[^0-9]#i','', $_SESSION["id"]); //filter everyhting but numbers and letters $manager = preg_replace('#[^A-Za-z0-9]#i','', $_SESSION["manager"]); //filter everything but numbers and letters $password = preg_replace('#[^A-Za-z0-9]#i','', $_SESSION["password"]); //filter everything but numbers and letters //Run mySQL query to be
  20. <?php session_start(); if(!isset($_SESSION["manager"])){ header("location: admin_login.php"); exit(); } // Be sure to check that this manager SESSION value is in fact in the database $managerID = preg_replace('#[^0-9]#i','', $_SESSION["id"]); //filter everyhting but numbers and letters $manager = preg_replace('#[^A-Za-z0-9]#i','', $_SESSION["manager"]); //filter everything but numbers and letters $password = preg_replace('#[^A-Za-z0-9]#i','', $_SESSION["password"]); //filter everything but numbers and letters //Run mySQL query to be sure that this person is an admin and that t
  21. it gets rid of the code at the top of page but it also gets rid of the date that usually shows in the inventory list section for the product list (if that makes sense). can not seem to win at the moment! sorry
  22. there is no returned error just this appears at the top of the page when viewed through browser array 0 => string '9' (length=1) 'id' => string '9' (length=1) 1 => string 'hat' (length=3) 'product_name' => string 'hat' (length=3) 2 => string '10' (length=2) 'price' => string '10' (length=2) 3 => string 'brill' (length=5) 'details' => string 'brill' (length=5) 4 => string 'Clothing' (length=8) 'category' => string 'Clothing' (length=8) 5 => string 'Hats' (length=4) 'subcategory' => string 'Hats' (length=4) 6 =
  23. ia m unsure how to or where to with this code while($row = mysql_fetch_array($sql)){ echo '<pre>'; var_dump($row); echo '</pre>'; }
×
×
  • Create New...