complete newby who is keen to make a search page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WindAndWaves

    complete newby who is keen to make a search page

    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


  • Erwin Moller

    #2
    Re: complete newby who is keen to make a search page

    WindAndWaves wrote:
    [color=blue]
    > 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[/color]

    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

    Comment

    • WindAndWaves

      #3
      Re: complete newby who is keen to make a search page


      "Erwin Moller"
      <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
      message news:41aec57e$0 $78753$e4fe514c @news.xs4all.nl ...

      Thank you for your reply

      [....knip knip .....]
      [color=blue]
      >What do you exactly mean by searching?[/color]
      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

      [color=blue]
      > If you are new to:
      > - databases (setup and querying)[/color]

      I have years of experience with MS access
      [color=blue]
      > - clientside/serverside basics[/color]

      true newbie
      [color=blue]
      > - HTML[/color]

      I have enough experience to make anything work
      [color=blue]
      > - PHP (or programming in general)[/color]

      this is where the newbie thing definitely comes in.
      [color=blue]
      >
      > If you are new to those (especially programming in general), honestly,[/color]
      take[color=blue]
      > at least a few months. Or years.
      >
      > But programming is great fun, I am addicted to it. :P
      >
      > Regards,
      > Erwin Moller[/color]

      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


      Comment

      • Erwin Moller

        #4
        Re: complete newby who is keen to make a search page

        WindAndWaves wrote:

        <snip, or knip for Dutchies. :P .. >
        [color=blue]
        >[color=green]
        >>What do you exactly mean by searching?[/color]
        > 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[/color]

        Ok, that is relatively easy.
        [color=blue]
        >
        >[color=green]
        >> If you are new to:
        >> - databases (setup and querying)[/color]
        >
        > I have years of experience with MS access[/color]

        Good.
        That means the SQL-part will be a piece of cake for you.
        [color=blue]
        >[color=green]
        >> - clientside/serverside basics[/color]
        >
        > true newbie[/color]

        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)

        [color=blue]
        >[color=green]
        >> - HTML[/color]
        >
        > I have enough experience to make anything work[/color]

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

        [color=blue]
        >[color=green]
        >> - PHP (or programming in general)[/color]
        >
        > this is where the newbie thing definitely comes in.[/color]

        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 counterintuitiv e. 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 programminglang uage, 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.)

        [color=blue]
        >[color=green]
        >>
        >> If you are new to those (especially programming in general), honestly,[/color]
        > take[color=green]
        >> at least a few months. Or years.
        >>
        >> But programming is great fun, I am addicted to it. :P
        >>
        >> Regards,
        >> Erwin Moller[/color]
        >
        > 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[/color]

        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

        Comment

        • Razzbar

          #5
          Re: complete newby who is keen to make a search page

          "WindAndWav es" <access@ngaru.c om> wrote in message news:<kBtrd.211 69$9A.340395@ne ws.xtra.co.nz>. ..[color=blue]
          > 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).[/color]

          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.

          Comment

          • R. Rajesh Jeba Anbiah

            #6
            Re: complete newby who is keen to make a search page

            "WindAndWav es" <access@ngaru.c om> wrote in message news:<kBtrd.211 69$9A.340395@ne ws.xtra.co.nz>. ..[color=blue]
            > 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.[/color]

            Hmmm... Probably you should learn PHP first or hire a programmer;
            and in any case I would suggest you to hire a programmer.
            [color=blue]
            > 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).[/color]

            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/

            Comment

            • WindAndWaves

              #7
              Re: complete newby who is keen to make a search page


              "Erwin Moller"
              <since_humans_r ead_this_I_am_s pammed_too_much @spamyourself.c om> wrote in
              message news:41b04b53$0 $36861$e4fe514c @news.xs4all.nl ...[color=blue]
              > WindAndWaves wrote:
              >
              > <snip, or knip for Dutchies. :P .. >
              >[color=green]
              > >[color=darkred]
              > >>What do you exactly mean by searching?[/color]
              > > 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[/color][/color]
              items[color=blue][color=green]
              > > 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 =[/color][/color]
              red)[color=blue][color=green]
              > > 3. server (PHP?) creates new HTML file with items that were returned[/color][/color]
              from[color=blue][color=green]
              > > the SQL using a particular field in the table that contains the HTML for
              > > each item to be returned[/color]
              >
              > Ok, that is relatively easy.
              >[color=green]
              > >
              > >[color=darkred]
              > >> If you are new to:
              > >> - databases (setup and querying)[/color]
              > >
              > > I have years of experience with MS access[/color]
              >
              > Good.
              > That means the SQL-part will be a piece of cake for you.[/color]

              Do you know if the SQL syntax is the same?


              [...snip ....]
              [color=blue]
              > Good.
              > Also Forms??
              > radiobuttons, textfields, dropdowns?
              > You will need those for the search.[/color]

              piece of cake - i have already setup the search form
              [color=blue]
              >
              >[color=green]
              > >[color=darkred]
              > >> - PHP (or programming in general)[/color]
              > >
              > > this is where the newbie thing definitely comes in.[/color]
              >
              > Ok, and this is where this newsgroup will try to motivate you. :-)
              >
              > Seriously, PHP is the best choice of all serverside languages these days,[/color]
              in[color=blue]
              > 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. :-)[/color]

              GREAT

              [color=blue]
              > To name a few (very personal, next person might have different ideas)
              >
              > Perl: too much shell-oriented for my taste
              >
              > VB-Script: completely counterintuitiv e. Childish constructs like If ..[/color]
              Then[color=blue]
              > .. Else .. End If instead of {}. Case insensitive. I do a lot VB, but[/color]
              don't[color=blue]
              > like it.[/color]

              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.

              [color=blue]
              > 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 programminglang uage,[/color]
              not[color=blue]
              > 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.)[/color]

              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.
              [color=blue]
              >[color=green]
              > >[color=darkred]
              > >>
              > >> If you are new to those (especially programming in general), honestly,[/color]
              > > take[color=darkred]
              > >> at least a few months. Or years.
              > >>
              > >> But programming is great fun, I am addicted to it. :P
              > >>
              > >> Regards,
              > >> Erwin Moller[/color]
              > >
              > > 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[/color][/color]
              make[color=blue][color=green]
              > > the PHP (or server side script for that matter).
              > >
              > > Hope this makes more sense now[/color]
              >
              > 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?[/color]

              Yes, I have one search page with all characteristics
              [color=blue]
              > 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,[/color]
              based[color=blue]
              > 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.)[/color]

              I will change to MySQL
              [color=blue]
              > What you have to learn in PHP, beside the basics, is how to query a[/color]
              database[color=blue]
              > and display the result in HTML.
              > It is not complicated, but if you are new to programming in general, it[/color]
              will[color=blue]
              > 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[/color]


              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.


              Comment

              • Erwin Moller

                #8
                Re: complete newby who is keen to make a search page

                WindAndWaves wrote:

                <snip>
                [color=blue][color=green][color=darkred]
                >> >
                >> > I have years of experience with MS access[/color]
                >>
                >> Good.
                >> That means the SQL-part will be a piece of cake for you.[/color]
                >
                > Do you know if the SQL syntax is the same?[/color]

                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. :-)

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

                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>
                [color=blue][color=green]
                >>
                >> VB-Script: completely counterintuitiv e. Childish constructs like If ..[/color]
                > Then[color=green]
                >> .. Else .. End If instead of {}. Case insensitive. I do a lot VB, but[/color]
                > don't[color=green]
                >> like it.[/color]
                >
                > 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.[/color]

                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>
                [color=blue][color=green]
                >> 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.)[/color]
                >
                > 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.[/color]

                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>
                [color=blue][color=green]
                >>
                >> 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.)[/color]
                >
                > I will change to MySQL[/color]

                Good choice. It runs on both W$ and *nix.
                [color=blue]
                >
                > 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.[/color]

                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

                Comment

                Working...