Jump to content

LukePVB

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by LukePVB

  1. I want to build my site using this PHP script so when i want to add more links to the navigation bar on all pages, I can by only changing one page. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta charset="utf-8"> <link href="css/main.css" rel="stylesheet" type="text/css"> </head> <body> <div id="container"> <header> I use was trying to use the same script to load my header.That script seem to be stopping the rest of the HTML from loading. The script I was using to load my header is the following <?php include("header.php"); echo $header; ?>
  2. I'm having trouble including my navigation bar in my web pages using PHP. This is the script i have included in my web page, but it's not working. <?php include("navbar.php"); navBar(); ?> This is the script in navbar.php enclosing my navigation bar. <? function navBar() { ?> NAVIGATION BAR <? } ?> Help is appreciated.
  3. Hi, I need help with my ecommerce site. Some of the things I need help with are as follows: paypal and credit card payment gateway easy automatic refunds through clickable button product upload (can add price, % off, $ off, and sale expiry date that removes % or $ off of price when it expires and also displays a price after the sale factor is calculated. Can also select product type and sub product type from corresponding custom iframe) product mangement (edit and delete) Account creation including adding locations of stores, adding flyers and adding special offers (have to have specific image size requirements for upload) Shopping cart with a shopping cart login page and billing info form. Wish list Product comparison Simple search with location and distance search modifier users location finder (gets the location of the user viewing the site and displays it in the location field) I need to know the estimated amount of time required to add each of these. The price I pay per hour will reflect on how many hours it takes to put this site together and get it working properly. Send me a message if you can help me with this site. Thanks, Luke!
  4. Hi, I have a script that sends uploaded images to my images folder on my web server. Im not sure but I think it also renames the images (which is what I want to happen). Could someone please take a look at this script for me and tell me if it does rename the images? I also want the script to send the name of the image, after it's renamed, to the database table in row labeled 'images'. Could someone help me with this? Heres the script: <?php // define a constant for the maximum upload size define ('MAX_FILE_SIZE', 1024 * 50); if (array_key_exists('upload', $_POST)) { // define constant for upload folder define('UPLOAD_DIR', '/path/to/images/'); // replace any spaces in original filename with underscores $file = str_replace(' ', '_', $_FILES['image']['name']); // create an array of permitted MIME types $permitted = array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'); // upload if file is OK if (in_array($_FILES['image']['type'], $permitted) && $_FILES['image']['size'] > 0 && $_FILES['image']['size'] <= MAX_FILE_SIZE) { switch($_FILES['image']['error']) { case 0: // check if a file of the same name has been uploaded if (!file_exists(UPLOAD_DIR . $file)) { // move the file to the upload folder and rename it $success = move_uploaded_file($_FILES['image']['tmp_name'], UPLOAD_DIR . $file); } else { $result = 'A file of the same name already exists.'; } if ($success) { $result = "$file uploaded successfully."; } else { $result = "Error uploading $file. Please try again."; } break; case 3: case 6: case 7: case 8: $result = "Error uploading $file. Please try again."; break; case 4: $result = "You didn't select a file to be uploaded."; } } else { $result = "$file is either too big or not an image."; } } ?>
  5. This is not what i'm looking for. This only narrows down the listings by either selecting details that contain a specific city or contain a specific catagory. I'm looking to narrow down the listings to ones that have both the city and the catagory.
  6. Okay thanks for your help so far. I got the code to work somewhat how i want it to. But i dont know how to add a second WHERE function so it narrows down the listing by two catagories not one. the code i got so far is
  7. Could u tell me where that goes exactly and show me an example? im a noobie.
  8. I have a listing script that I put together with dreamweaver that lists ads with page title hyperlinked, company name, phone number, page description, website url and company logo. Right now it lists all the items in my database. Id like to narrow this down by limiting the listings to a specific city and catagory. For example oshawa and basement waterpoofing. Iv got 2 major scripts. I;m not sure which one needs to be modified to narrow down my listing so ill include both. and Any help is appreciated.
  9. mySQL version:5.5.24 I need help with the column type ENUM. What I want to happen is for this column to get either yes or no values. I think ENUM is used specifically for this but i dont know how to set up the column for this to work. I tried to just select ENUM as the type and leave everything else blank but when I save it gives me the error "This is not a number". I have other columns, but im almost sure the error is coming from the ENUM column. 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.