Need help to write PHP script

4 replies
I am learning PHP language these days, and I have already posted a few posts here before, and now today I got another question. In warrior forum, I got answers for all of my questions posted here, so I hope I will find help for this too. Just look at the screenshot below. The screenshot is taken from the website www(dot)canaseed(dot)com. I want to create the same feature in PHP. For example, if I select Indica from categories available in the drop-down list, I will get all seeds on a page which are indica only, and the same is with other types of seeds.

I know this well that the data will be stored in MySQL database and there will be a field (say "Type"), that will contain types of each seed. But I don't know how to show them on a page when we select a category from drop-down categories list, just like we do with an advanced search feature or during filtering the search results. Just visit the website and see it yourself, I need the same functionality.
Any help will be appreciated.

#php #script #write
  • Profile picture of the author wayfarer
    If your goal is to learn PHP, I'll tell you from the beginning that the best way to learn is to do your own research. Learn how to connect to and make calls to the database here: PHP: Mysql - Manual ... It is probably easier for you to get started using the original MySQL API, rather than mysqli.

    Second, you'll need to create tables that hold information. The easiest way to get started is probably with PHP MyAdmin, which comes with most hosts.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[7400170].message }}
    • Profile picture of the author Brandon Tanner
      PHP.net is a great resource, as Wayfarer mentioned, but it can be a little overwhelming to someone just starting out.

      If you want to learn the basics of PHP & MySQL, I would recommend starting out at beginner-level tutorial sites like Tizag.com or W3Schools.com.

      Then after you get comfortable with the basics, everything at PHP.net will make a lot more sense.
      Signature

      {{ DiscussionBoard.errors[7400237].message }}
  • Profile picture of the author Terry Crim
    [DELETED]
    {{ DiscussionBoard.errors[7406904].message }}
    • Profile picture of the author wayfarer
      Originally Posted by Terry Crim View Post

      I purposely did not show any code so you can go learn on your own.
      Yep, agreed. If you want code replies, you need to show what you have tried.
      Signature
      I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
      {{ DiscussionBoard.errors[7408739].message }}
      • Profile picture of the author davetrebas
        I have not tried this yet in my php code - just found it on another forum.

        php is normally hard to debug. No breakpoints etc.

        If you use FireFox there is an addon called firebug that is used to debug java script on the page. There is an extension of that to debug php called firephp. it does not have breakpoints, but allows you to see a trace of what is happening.

        Again, I have no experience with this, but might something to look at to help you better learn php. do google search for firebug and firephp.

        One thing I read is that it can be made to work with Wordpress.

        I plan to use this for my next php project.

        Just an idea
        {{ DiscussionBoard.errors[7412110].message }}

Trending Topics