8 Replies - 14210 Views - Last Post: 24 May 2011 - 03:20 PM Rate Topic: -----

#1 martinn82   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-May 11

PHP Programming Question

Posted 23 May 2011 - 02:23 PM

Greetings!

I am new to PHP and I have a small project I need advice on. I am a volunteer fire fighter and I have redesigned our departments website and we cover 2 counties with burn ban information. I would like to automate VIA a webpage a "click to turn on/off" feature for this. Should this be done VIA PHP or JAVA, or other? The easiest and simplest the better as my skill stops once I get outside of dreamweaver.

I am looking to make a generic page with a button that says "enable ban" and once its enabled it would say "end ban" and when you click on the button it changes the image on the webpage automatically. Can this be done (I am sure it can be) but how hard will it be?

Thanks in advanced.

Is This A Good Question/Topic? 0
  • +

Replies To: PHP Programming Question

#2 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3837
  • View blog
  • Posts: 13,994
  • Joined: 08-August 08

Re: PHP Programming Question

Posted 23 May 2011 - 02:43 PM

This should be easy to do in PHP.
Was This Post Helpful? 1
  • +
  • -

#3 GhandiJones   User is offline

  • D.I.C Head
  • member icon

Reputation: 54
  • View blog
  • Posts: 174
  • Joined: 17-March 11

Re: PHP Programming Question

Posted 23 May 2011 - 03:13 PM

Is this information going to be stored on the website/server (for individual users) at all, or is it solely for single use display purposes?

The first, I'd go with PHP. The latter I'd go javascript.
Was This Post Helpful? 0
  • +
  • -

#4 martinn82   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-May 11

Re: PHP Programming Question

Posted 23 May 2011 - 04:24 PM

Hi GhandiJones thanks for the reply,

This would be on the backend of the site and the displayed image or outcome would be displayed on index.html in a column where both counties would report the burn ban status. Its just something someone can navigate to inter-department and click to change versus me having to open a text editor or dreamweaver and tell it to swap images as the burn bans frequently change. They want a monkey (someone with no editing skills) to be able to tell it to change.

If you recommend Javascript can you tell me how I would start or point me to some good resources that I can learn from versus just talk. I have noticed most resources dont help you from the start they assume you know some form of programming already. Unfortunately I never got into the programming aspect of webdesign and usually had someone freelance such a thing in the past but now I am looking to learn.

Thanks again!


View PostGhandiJones, on 23 May 2011 - 03:13 PM, said:

Is this information going to be stored on the website/server (for individual users) at all, or is it solely for single use display purposes?

The first, I'd go with PHP. The latter I'd go javascript.

Was This Post Helpful? 0
  • +
  • -

#5 codeprada   User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 963
  • View blog
  • Posts: 2,382
  • Joined: 15-February 11

Re: PHP Programming Question

Posted 23 May 2011 - 04:36 PM

You're going to need PHP because you'll want to store the 'burn ban' status in a database. You'll only need Javascript if you want to change the image dynamically (without reloading the page). But then you'll have to send the 'burn ban' status using Ajax to the server. It all depends on how you want to do it. You can have a static page that has to be reloaded to change the 'burn ban' status which will only need PHP or dynamically using Javascript\Ajax.

I'm also assuming not any and anyone can change this. You won't want a random user like let's say me to go unto the site and falsify the status. With that said you'll need a login system with each person that's suppose to be authorized to change such a thing have their own credentials.
Was This Post Helpful? 0
  • +
  • -

#6 martinn82   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-May 11

Re: PHP Programming Question

Posted 23 May 2011 - 04:43 PM

I plan on hiding the page temporarily and eventually yes we will be locking it down with other things or I suppose I could just lock the directory and have htaccess do it instead for now. So basically php is the way to go? Where do I start when it comes to writing a php script? I can open up a blank php file in dreamweaver but I need to know what to write in it (or where to start) I assume I will have to call for a database etc.

I guess I am just wondering how to lay it out ie: database name and credentials, call the database, check status etc... Like I said before I have no experience programming what so ever .. I am a tutorial guy. I am not sure aside from the tags what a php fle must contain... Any good resources? I have checked out w3schools and php.net before but its all gibberish to me.

Thanks!



View Postcodeprada, on 23 May 2011 - 04:36 PM, said:

You're going to need PHP because you'll want to store the 'burn ban' status in a database. You'll only need Javascript if you want to change the image dynamically (without reloading the page). But then you'll have to send the 'burn ban' status using Ajax to the server. It all depends on how you want to do it. You can have a static page that has to be reloaded to change the 'burn ban' status which will only need PHP or dynamically using Javascript\Ajax.

I'm also assuming not any and anyone can change this. You won't want a random user like let's say me to go unto the site and falsify the status. With that said you'll need a login system with each person that's suppose to be authorized to change such a thing have their own credentials.

Was This Post Helpful? 0
  • +
  • -

#7 GhandiJones   User is offline

  • D.I.C Head
  • member icon

Reputation: 54
  • View blog
  • Posts: 174
  • Joined: 17-March 11

Re: PHP Programming Question

Posted 23 May 2011 - 05:58 PM

It's going to require that you read a book and/or several tutorials on PHP/MySQL. You're also going to need a dev environment for working with PHP on your local machine. I use WAMP, and have for awhile. I recommend doing a search for "setting up php" or "installing WAMP (or XAMP)". Do some research to see which one you prefer. They're both very similar. There are also quite a few youtube videos for installing wamp or xamp.
Was This Post Helpful? 0
  • +
  • -

#8 martinn82   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 23-May 11

Re: PHP Programming Question

Posted 23 May 2011 - 08:56 PM

Appreciate it. I have heard of WAMP before but never used it. My issue has always been how to start the strings or compose the script. I will check into it a bit more and see what I can come up with. In the mean time if you recommend any specific php tutorial sites feel free to shoot them my way.

Appreciate the help guys thanks.


View PostGhandiJones, on 23 May 2011 - 05:58 PM, said:

It's going to require that you read a book and/or several tutorials on PHP/MySQL. You're also going to need a dev environment for working with PHP on your local machine. I use WAMP, and have for awhile. I recommend doing a search for "setting up php" or "installing WAMP (or XAMP)". Do some research to see which one you prefer. They're both very similar. There are also quite a few youtube videos for installing wamp or xamp.

Was This Post Helpful? 0
  • +
  • -

#9 GhandiJones   User is offline

  • D.I.C Head
  • member icon

Reputation: 54
  • View blog
  • Posts: 174
  • Joined: 17-March 11

Re: PHP Programming Question

Posted 24 May 2011 - 03:20 PM

Tons of php tutorials on this website. I also recommend going on youtube, and looking up php tutorials from thenewboston. He does a good job of explaining the basics.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1