Home Community Submit Tutorials Downloads Gallery Links Contact FAQ's / Help
  Home
  Submit Tutorials
  Community
  Tutorials
  Fonts
  Templates
  Affiliates
  Photography Corner
  Site Map
  Contact Us
 
Affiliates
  Pixel Apex
  Trick Digest
  Racuda
  Adobe Tutorialz
  Pixel2life
  Good-Tutorials
  Tutorialized
  Deviantart
  Chipmunk-Scripts
  Majesticlicks
  Free-Brushes
 
Tutorial Categories
3D Studio Max
Adobe Photoshop
Adobe Fireworks
Adobe Flash
Adobe Flex
Adobe Illustrator
ASP.NET
Dreamweaver
eCommerce
Gimp
Maya
PHP Coding
Swift 3D Swift 3D
Windows Operation
 
Tutorial
Name:
Affiction Design
Author:
Tshirtclipart
Gallery Image
Name:
Mask
Author:
Pixel Digest
 
Search:
Search Example: Orb, Oman3d, Adobe Photoshop or Picture Editing
 
 
PHP Search - Learn how to create a site search using php and dreamweaver.
Introduction: In this tutorial I will teach you how using dreamweaver you can create a site search with the option to select different categories. It is very simple, the main part is creating a database to store the information you will be searching. If you are having problems feel free to e-mail us, or post a message on the forum.
 

 

Part1: What do I need to get started?
Since I am doing this locally on my machine For this to work you will need to have the software below installed. Also if you want to apply this to your live web site, your hosting company need to run PHP MYSQL

  1. WAMP5 : http://www.wampserver.com/en/index.php

  2. EMS SQL Manager for MySQL (WAMP5 comes with a sql manager, you can use it, or which ever one you are familiar with.

Download and install both software, if you installed wamp5, by default it would create a folder located in C:\wamp\www\, create two more folders inside the www\ directory called localroot and the other webroot.

Part2: First you will need to setup your database as shown below. I have an older version than wants shown above. You can also use other MySQL managers that you are use to.

The table name is "table2" with different fields, title, date, description, and category. I also entered Data into this table shown below.

In this tutorial I will setup a site search to search the contents stored in the title and description. And using a dropdown menu you will be able to specify what portion of the category you want.

Part3: With your database setup, Start up Dreamweaver and click New Site Manage Sites.

 

and click New Site. Click on the Advanced Tab and you will see the window below. Click on Local Info and fill in the information shown.

  

  

 

Click ok and Done, when you are satisfied. Create a new php page and name it search.php. Copy the code below and paste it onto your search page.

After doing that you should have the form below.

Save your page (Ctrl+S). The action is set to /webroot/sitesearch/result2.php so if your directory is different remember to change this.

Part4: Creating the result page.
Click on Bindings in the Application window

With that click on the + and select Recordset

After selecting recordset you will see the window below. If not click on Advanced. In the SQL window add the code shown below.

SELECT *
FROM table2
WHERE title LIKE colname OR table2.description LIKE %mydesc% AND table2.category LIKE %search%

Now in the Variables window click on the +

By doing that it should bring up the window below. Fill in the information shown.

colname

mydesc

 

search 

With that you should have the setup below.

Click ok to save the settings.

Part5: Display the search results.
Create the table shown below. This is a setup to display the content when its search for.

Click on the (+) next the recordset

Now click on the field names and drag it into the table to get the effect shown below.

Click on the table and in the taskbar you will see the tag shown below.

Click on the Table tag to select your table. In the Application Window click on Server behavior. Click on the and select Repeat Region

This allows you to specify how many records or items you want to display on the page. Enter a number and click ok. Below the tables you just create type the information shown below.

Highlight the text, In the Application Window click on Server behavior. Click on the select Show Region and Show If Recordset is Empty.

Finished:
Well that is it, hope it came out to what you expected. If you have any question or comment about this tutorial, feel free to post a message on the forum. I also created a video tutorial for this example. The file is a 9.44 MB flash file. I have the link up on the video section on the forums. Users have to register to view the file, because of spam after you register. Email me at markc1822(at)pixeldigest.com with your user name and I will activate your account. Click here to register.

 

This Tutorial was Created By Mark
© 2007 pixeldigest.com. All Rights Reserved.

 
 
Help Support Us
 
 
 
News Updates
Updated the Forum, Unfortunately i could not use the same link as the old forum for the update. For the new link click Here. All the post and user name are still usable. So, if you previously registered you can still use the old username and password. Some accounts that was not used were deleted.  
 
News Update [10/16/07]
Yesterday on the 15th of October my gallery went down for some unknown reason. I was able to get the backup of the images, i just lost all the users. The gallery was not that active but i am sill pissed about what happened. I am in the process of reloading the gallery. Just give me some time and it should be up and running.Yesterday on the 15th of October my gallery went down for some unknown reason. I was able to get the backup of the images, i just lost all the users. The gallery was not that active but i am sill pissed about what happened. I am in the process of reloading the gallery. Just give me some time and it should be up and running.  
... Read More
 
Bookmark This Page
 
 
Untitled Document
Latest Gallery Image
 
Sponsors
Custom Shapes
Custom Shapes
 
 

Home | Submit | Tutorials | Forums | Gallery | Fonts | Downloads | Templates | Affiliates | Sitemap | Contact | FAQ's / Help

© 2005 - 2008 pixeldigest.com