By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,856 Members | 1,986 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,856 IT Pros & Developers. It's quick & easy.

complete newby who is keen to make a search page

P: n/a
Hi Gurus

I am keen to make a search page on a website, but I have absolutely zero
experience with PHP. I am going to hire an expert, but I thought that it
may pay to try it a bit first myself (I do want to learn how to do it).

What I have is a search page (HTML) and an access database. Now, can
someone give me some clues or links on where to start.

I prefer not to install the whole PHP thing on my own computer, but just to
try it straight on the server (if this is possible).

TIA
- Nicolaas
Jul 17 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
WindAndWaves wrote:
Hi Gurus

I am keen to make a search page on a website, but I have absolutely zero
experience with PHP. I am going to hire an expert, but I thought that it
may pay to try it a bit first myself (I do want to learn how to do it).

What I have is a search page (HTML) and an access database. Now, can
someone give me some clues or links on where to start.

I prefer not to install the whole PHP thing on my own computer, but just
to try it straight on the server (if this is possible).

TIA
- Nicolaas


Hi Nicolaas,

What do you exactly mean by searching?
Do you want you visitors to be able to search your own website?
If that is the case, you might want to use google for that. they offer this
service for free.

If you want to do it yourself, good for you! It is fun, but if this your
first project with PHP....

If you are new to:
- databases (setup and querying)
- clientside/serverside basics
- HTML
- PHP (or programming in general)

If you are new to those (especially programming in general), honestly, take
at least a few months. Or years.

But programming is great fun, I am addicted to it. :P

Regards,
Erwin Moller
Jul 17 '05 #2

P: n/a

"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:41***********************@news.xs4all.nl...

Thank you for your reply

[....knip knip .....]
What do you exactly mean by searching? Sorry, yes, I should clarify. What I mean is that I have a list of lets say
100 items with a bunch of characteristics (e.g. colour, number of holes,
size, etc..), now I want the user to be able to search these items using a
search pages (e.g. by entering the colour, the number of holes required,
etc...). Basically, the search would work like this:

1. user enters search criteria
2. server (PHP?) creates SQL (e.g. select * from table where colour = red)
3. server (PHP?) creates new HTML file with items that were returned from
the SQL using a particular field in the table that contains the HTML for
each item to be returned

If you are new to:
- databases (setup and querying)
I have years of experience with MS access
- clientside/serverside basics
true newbie
- HTML
I have enough experience to make anything work
- PHP (or programming in general)
this is where the newbie thing definitely comes in.

If you are new to those (especially programming in general), honestly, take at least a few months. Or years.

But programming is great fun, I am addicted to it. :P

Regards,
Erwin Moller


Basically, I would like most of the data to be prepared in the Access
database (I can do that easily) so that it is as easy as possible to make
the PHP (or server side script for that matter).

Hope this makes more sense now
Jul 17 '05 #3

P: n/a
WindAndWaves wrote:

<snip, or knip for Dutchies. :P .. >
What do you exactly mean by searching? Sorry, yes, I should clarify. What I mean is that I have a list of lets
say 100 items with a bunch of characteristics (e.g. colour, number of
holes, size, etc..), now I want the user to be able to search these items
using a search pages (e.g. by entering the colour, the number of holes
required,
etc...). Basically, the search would work like this:

1. user enters search criteria
2. server (PHP?) creates SQL (e.g. select * from table where colour = red)
3. server (PHP?) creates new HTML file with items that were returned from
the SQL using a particular field in the table that contains the HTML for
each item to be returned


Ok, that is relatively easy.

If you are new to:
- databases (setup and querying)
I have years of experience with MS access


Good.
That means the SQL-part will be a piece of cake for you.
- clientside/serverside basics
true newbie


Ok.
The most important things about client/server-basics to learn for your
application are:
- Forms (HTML)
- Recieve the form-info posted by a HTML-form from a client in your PHP
script.
- Sessions. (Very handy, but maybe not 100% needed for the search. But
believe me, they make your life easier)

- HTML
I have enough experience to make anything work


Good.
Also Forms??
radiobuttons, textfields, dropdowns?
You will need those for the search.

- PHP (or programming in general)
this is where the newbie thing definitely comes in.


Ok, and this is where this newsgroup will try to motivate you. :-)

Seriously, PHP is the best choice of all serverside languages these days, in
my very humble opinion.

I did my share of serverside languages: Perl/VB-script-ASP/and a lot of
Java/JSP/servlets. Even did some C serverside.
They all have their good and bad points.

Let me give you a very quick overview of some serverside languages.
Don't worry, I will conclude PHP is the best choice for you now. :-)

To name a few (very personal, next person might have different ideas)

Perl: too much shell-oriented for my taste

VB-Script: completely counterintuitive. Childish constructs like If .. Then
... Else .. End If instead of {}. Case insensitive. I do a lot VB, but don't
like it.

Java: Great language. Beautifull. Really. But for everyday simple use too
much overhead. You also need to learn a lot about environmental stuff
before the first thing works, like: web.xml, deployers, container it runs
in, contexts, etc.

C? Who wants to write CGI in C nowadays? Too much a programminglanguage, not
really oriented for the web. Great libraries though..

From my experience: PHP is the easiest, most intuitive, and clean language
for basic serverside stuff.
(If things get really complicated I prefer Java/JSP/Servlets)

So hang on, make some time, and get a really good PHP starters-book in.
(O'Reilly prints greats stuff)

If you are Dutch (you said knip knip instead of snip), and can visit
Rotterdam, where I work (own company), you are welcome to drop in and just
start studying. I am happy to get you going on PHP and point you to the
right resources.
(Since I don't publish my emailadres anymore in newsgroups, you'll have to
give yours if you want to get in touch.)


If you are new to those (especially programming in general), honestly,

take
at least a few months. Or years.

But programming is great fun, I am addicted to it. :P

Regards,
Erwin Moller


Basically, I would like most of the data to be prepared in the Access
database (I can do that easily) so that it is as easy as possible to make
the PHP (or server side script for that matter).

Hope this makes more sense now


Yes, you do now. :-)

In a nutshell: what you need to do is:
make a decision how you want your database to be searched.

So decide to order.
First color?
Then the size?
Then the number of holes?

Or maybe you want a page with all attributes summed up and people can make
their own pick?

Next you try to decide WHAT should be shown on which page.
eg: if you decide that the visitor first must pick a color, your next page
should display ONLY results for that picked color.
In that way you get a rough idea what each PHP script should produce, based
on the data fed to it.

After that you start thinking about the SQL you need.

I don't think ACCESS is a great choice for a database, but PHP can easily
connect to it (via ODBC). Maybe there is a native API out there too, I am
unsure. I use Postgresql as my first choice for a database. Another very
popular database these days is of course MySQL. (But MySQL sucked when I
started using databases, so I picked Postgresql. Nowadays MySQL doesn't
suck anymore and is a great choice in combination with PHP.)

What you have to learn in PHP, beside the basics, is how to query a database
and display the result in HTML.
It is not complicated, but if you are new to programming in general, it will
take some time to get a good assured feeling you are doing things right.

Jeeez, I talk too much.
Got to get back to work!

Good luck.
And.... go PHP. Everybody I know that started with it, loves it.
Really.

Good luck.

Regards,
Erwin Moller
Jul 17 '05 #4

P: n/a
"WindAndWaves" <ac****@ngaru.com> wrote in message news:<kB*******************@news.xtra.co.nz>...
Hi Gurus

I am keen to make a search page on a website, but I have absolutely zero
experience with PHP. I am going to hire an expert, but I thought that it
may pay to try it a bit first myself (I do want to learn how to do it).

What I have is a search page (HTML) and an access database. Now, can
someone give me some clues or links on where to start.

I prefer not to install the whole PHP thing on my own computer, but just to
try it straight on the server (if this is possible).


PHP has to be on the -web- server. It helps if it's on the same computer
that the database is on, in subtle ways, too.
Jul 17 '05 #5

P: n/a
"WindAndWaves" <ac****@ngaru.com> wrote in message news:<kB*******************@news.xtra.co.nz>...
Hi Gurus

I am keen to make a search page on a website, but I have absolutely zero
experience with PHP. I am going to hire an expert, but I thought that it
may pay to try it a bit first myself (I do want to learn how to do it).

What I have is a search page (HTML) and an access database. Now, can
someone give me some clues or links on where to start.
Hmmm... Probably you should learn PHP first or hire a programmer;
and in any case I would suggest you to hire a programmer.
I prefer not to install the whole PHP thing on my own computer, but just to
try it straight on the server (if this is possible).


That is like fishing without net. But, it is quite possible if the
server is with php.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
Jul 17 '05 #6

P: n/a

"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:41***********************@news.xs4all.nl...
WindAndWaves wrote:

<snip, or knip for Dutchies. :P .. >
What do you exactly mean by searching? Sorry, yes, I should clarify. What I mean is that I have a list of lets
say 100 items with a bunch of characteristics (e.g. colour, number of
holes, size, etc..), now I want the user to be able to search these items using a search pages (e.g. by entering the colour, the number of holes
required,
etc...). Basically, the search would work like this:

1. user enters search criteria
2. server (PHP?) creates SQL (e.g. select * from table where colour = red) 3. server (PHP?) creates new HTML file with items that were returned from the SQL using a particular field in the table that contains the HTML for
each item to be returned


Ok, that is relatively easy.

If you are new to:
- databases (setup and querying)


I have years of experience with MS access


Good.
That means the SQL-part will be a piece of cake for you.


Do you know if the SQL syntax is the same?
[...snip ....]
Good.
Also Forms??
radiobuttons, textfields, dropdowns?
You will need those for the search.
piece of cake - i have already setup the search form

- PHP (or programming in general)
this is where the newbie thing definitely comes in.


Ok, and this is where this newsgroup will try to motivate you. :-)

Seriously, PHP is the best choice of all serverside languages these days,

in my very humble opinion.

I did my share of serverside languages: Perl/VB-script-ASP/and a lot of
Java/JSP/servlets. Even did some C serverside.
They all have their good and bad points.

Let me give you a very quick overview of some serverside languages.
Don't worry, I will conclude PHP is the best choice for you now. :-)
GREAT

To name a few (very personal, next person might have different ideas)

Perl: too much shell-oriented for my taste

VB-Script: completely counterintuitive. Childish constructs like If .. Then .. Else .. End If instead of {}. Case insensitive. I do a lot VB, but don't like it.
What about .net and also, is it a good or a bad thing to be case sensitive?
I think this is all about what you are used to.

Java: Great language. Beautifull. Really. But for everyday simple use too
much overhead. You also need to learn a lot about environmental stuff
before the first thing works, like: web.xml, deployers, container it runs
in, contexts, etc.

C? Who wants to write CGI in C nowadays? Too much a programminglanguage, not really oriented for the web. Great libraries though..

From my experience: PHP is the easiest, most intuitive, and clean language
for basic serverside stuff.
(If things get really complicated I prefer Java/JSP/Servlets)

So hang on, make some time, and get a really good PHP starters-book in.
(O'Reilly prints greats stuff)

If you are Dutch (you said knip knip instead of snip), and can visit
Rotterdam, where I work (own company), you are welcome to drop in and just
start studying. I am happy to get you going on PHP and point you to the
right resources.
(Since I don't publish my emailadres anymore in newsgroups, you'll have to
give yours if you want to get in touch.)
I am Dutch, but unfortunately live in New Zealand.... Thank you for the
invite though. Do you need any colleagues? I have a mate who is looking
for work in the Netherlands. He is very keen to learn and he has a comp
degree from Groningen - lol.

If you are new to those (especially programming in general), honestly, take
at least a few months. Or years.

But programming is great fun, I am addicted to it. :P

Regards,
Erwin Moller


Basically, I would like most of the data to be prepared in the Access
database (I can do that easily) so that it is as easy as possible to make the PHP (or server side script for that matter).

Hope this makes more sense now


Yes, you do now. :-)

In a nutshell: what you need to do is:
make a decision how you want your database to be searched.

So decide to order.
First color?
Then the size?
Then the number of holes?

Or maybe you want a page with all attributes summed up and people can make
their own pick?


Yes, I have one search page with all characteristics
Next you try to decide WHAT should be shown on which page.
eg: if you decide that the visitor first must pick a color, your next page
should display ONLY results for that picked color.
In that way you get a rough idea what each PHP script should produce, based on the data fed to it.

After that you start thinking about the SQL you need.

I don't think ACCESS is a great choice for a database, but PHP can easily
connect to it (via ODBC). Maybe there is a native API out there too, I am
unsure. I use Postgresql as my first choice for a database. Another very
popular database these days is of course MySQL. (But MySQL sucked when I
started using databases, so I picked Postgresql. Nowadays MySQL doesn't
suck anymore and is a great choice in combination with PHP.)
I will change to MySQL
What you have to learn in PHP, beside the basics, is how to query a database and display the result in HTML.
It is not complicated, but if you are new to programming in general, it will take some time to get a good assured feeling you are doing things right.

Jeeez, I talk too much.
Got to get back to work!

Good luck.
And.... go PHP. Everybody I know that started with it, loves it.
Really.

Good luck.

Regards,
Erwin Moller

Dear Erwin,

Thank you for your in-depth reply. I am stoked. I will do more research on
the topic. Your in-depth description gave me a really good idea on what is
involved and it does not seem to be so daunting any longer. thank you once
more for taking the time to reply to my post.
Jul 17 '05 #7

P: n/a
WindAndWaves wrote:

<snip>
>
> I have years of experience with MS access
Good.
That means the SQL-part will be a piece of cake for you.


Do you know if the SQL syntax is the same?


If you pick MySQL, you will not stumble on any difficulties you cannot
handle.
Take some time though to find out how MSAccess's autonumber works in MySQL.
Be sure you can get the lastest autonumber. (Or use MAX(bla) if you think
you can get away with that. :-))
Things like that.

This will be the easy part for you. :-)



[...snip ....]
Good.
Also Forms??
radiobuttons, textfields, dropdowns?
You will need those for the search.
piece of cake - i have already setup the search form


Good.

Now you'll have to learn how to replace values in the form with dynamically
generated values (from the database).
At least you don't have to focus on the forms themselfs.

<snip>

VB-Script: completely counterintuitive. Childish constructs like If ..

Then
.. Else .. End If instead of {}. Case insensitive. I do a lot VB, but

don't
like it.


What about .net and also, is it a good or a bad thing to be case
sensitive? I think this is all about what you are used to.


I didn't do any .net.
From what I heard it is a complete rip-off of Java's J2EE.
But that is ok.
Better stolen right than invented wrong. :-)

And you are right of course: It is just what you are used to.
The funny thing is I learned programming with Basic, some 20 years ago, and
now I cannot stand the language anymore. SO I was used to If Then Else, but
now I think {} makes a lot better readable code.

But you are right: It is a matter of taste.
<snip>
If you are Dutch (you said knip knip instead of snip), and can visit
Rotterdam, where I work (own company), you are welcome to drop in and
just start studying. I am happy to get you going on PHP and point you to
the right resources.
(Since I don't publish my emailadres anymore in newsgroups, you'll have
to give yours if you want to get in touch.)


I am Dutch, but unfortunately live in New Zealand.... Thank you for the
invite though. Do you need any colleagues? I have a mate who is looking
for work in the Netherlands. He is very keen to learn and he has a comp
degree from Groningen - lol.


No thanks, I am not looking for personel.
Actually, I used to have a lot of them, but I am not the manager kind of
guy. So Now I don't have any personel anymore, and want to keep it like
that. :-)
<snip>

I don't think ACCESS is a great choice for a database, but PHP can easily
connect to it (via ODBC). Maybe there is a native API out there too, I am
unsure. I use Postgresql as my first choice for a database. Another very
popular database these days is of course MySQL. (But MySQL sucked when I
started using databases, so I picked Postgresql. Nowadays MySQL doesn't
suck anymore and is a great choice in combination with PHP.)


I will change to MySQL


Good choice. It runs on both W$ and *nix.

Dear Erwin,

Thank you for your in-depth reply. I am stoked. I will do more research
on
the topic. Your in-depth description gave me a really good idea on what
is
involved and it does not seem to be so daunting any longer. thank you
once more for taking the time to reply to my post.


You are very welcome.

I wish you the best of luck studying PHP.
Just come back to this NG if you are hitting some problems.

Also be sure to have www.php.net online all the time. It has lots of
examplecode and other thing to get you going.

Good luck.

Regards,
Erwin Moller
Jul 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.