Jump to content
Killersites Forums

sjhwebdesign

Member
  • Posts

    46
  • Joined

  • Last visited

Profile Information

  • Location
    Lincolnshire

Contact Methods

  • Website
    http://www.djpc.co.uk

sjhwebdesign's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. My friend has a ecommerce site, but its not database driven ie each product is an html page. The name of the product is in the page url eg ww w . site . co m/product_name . htm Is it possible to search for a url containing/matching a search term entered in a form? eg type in "red car" and get ww w . site. com/red_car_product. ht m preferably with php.
  2. I have a few map entries for my mobile disco business, in several different counties as it is a travelling business. I have had these for a long time and no issue. eg a PE10 (Lincs) postcode, CB1 (Cambs), LE1 (Leics), etc.. Suddenly all 5 entries come up with the same address (LE1). Even though when I go into my local business center control panel they all have the correct addresses that I have given them. I haven't made any changes, it just suddenly happened, any ideas? Will this correct itself next tim Google re-indexes, caches etc? I know technically you are only supposed to use one address, but I provide a service that travels and Google maps doesn't really acommodate for this, I rank quite well in the main Google results but now that Google gives upto 10 map results for any area / business related search people will click all the map results before the main results. I don't want to bother with Adwords, I have tried this and its a waste of time, firstly people read top left down to bottom, so they rarely click them unless they are one of the ones that Google puts above the map results occassionally. Even then most click thrus are other businesses checking the competition, people looking for email address or generally people who want to waste your time offering services you don't require.
  3. <?php $getcategories = mysql_query("SELECT FROM categories ORDER BY name ASC"); ?> <?php while($categories = mysql_fetch_array( $getcategories )) { ?> <?php echo $categories['name']; ?> <?php } ?>
  4. in terms of 1 big main image and the rest as thumbs, you would need to tag one image as the main image. this could be done by having the main image in the user table as a main image feild and the images table is the additional images. or you could have a extra feild in the images table to tag the image order eg "theorder", and make the query: $getimages = mysql_query("SELECT * FROM images WHERE ownerid = '$userid' ORDER BY theorder ASC");
  5. eg search by name: <?php $name = $_POST['name']; $getresults = mysql_query("SELECT * FROM users WHERE name = '$name'"); while ($results = mysql_fetch_array($getresults)) { echo $results['name']; echo $results['city']; echo $results['state']; $userid = $results['id']; $getimages = mysql_query("SELECT * FROM images WHERE ownerid = '$userid'"); while ($images = mysql_query($getimages)) { ?> <?php } } ?> you would have to create your html layout to suit your webpage.
  6. your user table will have: id (autonumber, primary key) name city state your images table will have: id (autonumber, primary key) imageurl (the location of image on server eg http://www.yoursite.com/images/image.jpg ownerid (this is the id from the users table) example user: 10 fred orlando florida corresponding images: 1 http://www.yoursite.com/images/image1.jpg 10 ---------------- 2 http://www.yoursite.com/images/image2.jpg 10 Both images are owner by 10 which is the id for fred in the user table. The image upload form will be: you would have already assigned $userid earlier in your script eg: $userid = $_COOKIE['userid']; // if your are using a login cookie for example.
  7. use html with php to display the image: <?php $getresults = mysql_query("SELECT * FROM yourtable WHERE id = '$userid'"); while ($result = mysql_fetch_array($getresults)) { ?> <?php } ?> for multiple images you would do this in 2 ways; a) if you have a set amount of images, you would have imageurl, imageurl2, imageurl3 etc... in your user table. unlimitted images, you need two tables, users, images. you then link the tables eg: images table would contain; id, imageurl, imageowner - with imageowner being the id of the user. the query would then be $getimages = mysql_query("SELECT * FROM images WHERE ownerid = '$userid'");
  8. i don't think you can actually save an image in mysql, you would save its url in a mysql databse feild eg images/pic.jpg you would then use html with php to display eg;
  9. you can export / import between mysql and access so you can use access offline and mysql online, however one may not be as upto date as the other etc.. you can't use mysql offline, so you would be limitted to access, which is better used with asp, not php. php and mysql go together but only online. asp and access go together and you can use access offline. HOWEVER: You could run the mysql database for both the customer with the website front end, and have a seperate admin website which is password protected for the company to use the data, however it would require an internet connection. On the other hand if the database is only to be accessed by the company, then you could have you own mysql server and access it locally (you would need to speak to your IT dept about this). either could be done with php/mysql or asp/access, so depends which way you want to do it.
  10. you don't need the access database, the mysql database is used instead(however you can import the access records into a mysql database if your export it as csv and use phpmyadmin to import it into your mysql database. To use a form with a mysql database you need to make a mysql connection: <?php // db settings $db_host = "mysql.yourhost.com"; $db_user = "username"; $db_pwd = "password"; $db_name = "database"; mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); ?> you then need to assign a variable to each form feild: You then need to handle the data: <?php if (isset($_POST['Submit'])) { $info = $_POST['info']; mysql_query("INSERT INTO `yourtable` (info) VALUES ('$info')"); } ?>
  11. looks like its coming from the host server itself. "sitecontent.aspx" Maybe this is a script by your hosting provider to monitor your site content?
  12. to remove from google add this to .htaccess; Redirect theredir/theirpage.htm http://www.yoursite.com/yourpage.htm'>http://www.yoursite.com/yourpage.htm (one for each page ) Redirect theredir/ http://www.yoursite.com/yourpage.htm (one for each dir) This will look for people entering the offending url and redirect them to your site. I'm not sure how to remove from google cache if they wont do it for you. You should delete your cookies etc from your pc, your could have a tracking cookie/virus which has got hold of your ftp settings.
  13. $query="SELECT ID, Name, Description, Location, ListPrice, Price, Image FROM proclist WHERE ID = '$pass'"; asks your database to return results where the ID feild is equal to "pass", you can't have an id of zero if this is the primary key for the database, so there will be no results in your table that have an ID of zero so nothing will be displayed, same way for example there where 5 entries in your database and you set "pass" as 6 it would return nothing.
  14. cheers this one is pretty good as it does images and youtube vids; h tt p://rando mous.c o m/tools/floatbox/
  15. thanks for the advice, ive got "thickbox" running on my site. for anone who wants to use this, the css file they have in the download link doesnt work properly, but if you view their source code and find the css link from there it works ok.
×
×
  • Create New...