Email conversation
From | Brian Arnopp |
To | Me |
Subject | Help with search facility |
Date | 10 February 2006 13:11 |
Hi!
I am fairly new to the world of web design
I have for my use Dreamweaver 8
I want to create a searchable photogallery using a search form so that I
can put in say, London, and all the thumbnails of London come up.
I have searched far and wide but can't seem to find the answers.
I want to use <FORM> and </FORM> and between the tags put the code that
will do this.
Would appreciate very much if you could help and if so give me a
breakdown of how the code fits together plus any other useful advice.
Any other pointers with respect to this would be very helpful.
Regds
Brian Arnopp
From | Me |
To | Brian Arnopp |
Subject | Re: Help with search facility |
Date | 10 February 2006 15:44 |
Brian,
> I want to create a searchable photogallery using a search form so that I
> can put in say, London, and all the thumbnails of London come up.
That is very ambitious for someone new to web development. There is a proper
way to do this, and an easy way to do it. The proper way is going to require
a lot of learning, but if you want to have a custom written one, I suggest
that is what you do.
1. use a MySQL database to store the information about the images - their
titles, their addresses on the server, their descriptions, keywords, etc.
http://dev.mysql.com/doc/refman/5.0/en/
2. Use PHP to read the query, use it to search the database, and output the
list of thumbnails.
http://www.php.net/manual/en/
3. Use a standard web form to pass the query to the PHP script:
<form method="get" action="imagesearch.php">
<p><input type="text" name="searchfor">
<input type="submit" value="Search!"></p>
</form>
If you want to learn all that, then that is a good thing, but it will be
slow, and you must take the time to learn about cross site scripting and
other potential vulnerabilities.
If you just want to do it the easy way, then find someone else's gallery
system they have made available. There must be quite a few open source
gallery systems lying around on the web (although since I chose to do
everything myself, I have never gone looking for one).
Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
From | Brian Arnopp |
To | Me |
Subject | Re: Help with search facility |
Date | 16 February 2006 10:14 |
Hi Tarquin,
Apologies for the late reply [snip.]
I realise it is ambitious but I would rather understand how something
works - enquiring mind I guess!
Thanks very much for your help.
Regds
Brian