Jump to content

Do I need Php for this website...

- - - - -

  • Please log in to reply
5 replies to this topic

#1
GhzNcl

GhzNcl

    Newbie

  • Members
  • PipPip
  • 11 posts
  • Location:Italy
Hi guys, I have to make a website where people can decide what is the best thing between 2 things, for example there are two cars and you can
decide which is the best (in your opinion) then I need to calculate the % to know which is the favorite. Do I need to use Php or what?
I'm asking this because I don't know php, I only use Html/Css, but I want to make this website so I need some information about which language to learn etc... :)

Thanks guys!

#2
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
Well yes and no.
You will need a server side script to do so (php, asp, asp.net, ruby, python...) anyone will do.
This script could be pretty simple to do if you want to learn php & mysql.
But if you don't want to, you could use a free poll script
A fast google search for the word "free php poll script" will give you millions of easy script that you simply have to read the install file to be able to install.

#3
GhzNcl

GhzNcl

    Newbie

  • Members
  • PipPip
  • 11 posts
  • Location:Italy
Of course I want to learn Php + mysql, what is your advice to learn it? Which resources and which programs?

Thanks :)

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
If you are familiar with another programming language and SQL, you should be able to just use the PHP documentation and get very far (that's what I did). If you need a jump start, I found the tutorials at Tizag Tutorials and W3Schools Online Web Tutorials quite good.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
Great you want to learn :)

Happy for you, everything (almost everything) in php/mysql is free.
First you need a editor. You can use notepad (that come with every version of window), I prefer Eclipse, but their a lots of other (code block, vim, notepad++...) they are all good, it's simply preferences, try them and take the one you like (some of them like phpEdit you will need to pay, but most of them are free)

Than you'll need a server, you can install one on your own computer without any problem, download this software Install PHP 5 Apache MySQL on Windows : WampServer and you'll be set.

And after that, read 2-3 tutorials on this forum, and start playing with php & mysql

A poll project can be pretty simple... and it can go pretty big, so it's perfect for learning
The basic form, will be a 2 columns table in your database, one for people that like your question, and a other one for people that don't like, and you simply add 1 each time someone click.

Than, when you'll get better, you could add cookie and ip protection to block people voting multiple time.
You could add statistics, most people vote at what time...
You could add a lots of thing.

If you have any question do not fear to ask question ;)

#6
bbqroast

bbqroast

    Codecall Addict

  • Members
  • PipPipPipPipPipPipPip
  • 554 posts
  • Location:/etc/passwd
Install XAMPP as your server
http://forum.codecal...er-package.html
Then get an editor, as Vaielab mentioned notepad can do it fine. I however recommend Notepad++ (free) it does thngs such as text editing.
Your poll:
HTML Webpage with form > PHP Script that takes the chosen option's ID and puts it in a MySQL table.
And to view the result you just count the amount of rows with that ID.

BTW
PHP pages are like webpages where Apache runs everything in between the <?php and the ?> before displaying the page (nothing in between these tags appears on the pgae unless echoed with the echo() or print() functions).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users