View Full Version : Text box connected to database

03-11-2012, 01:46 PM
I have a problem with programming in JS the following;

first part of the problem:
In the middle of the site would be a short text (some kind of quote) which you could refresh simply by clicking on a button bellow text (in this case a new quote would appear in the text box) or you could agree with the quote by clicking on second button bellow the code (in this case there would appear a smiley face :) in the text box). Quotes would be randomly selected from the database.

second part of the problem:
I also wish to record whether or not people agree with the quote. I was suggested to use server side language like PHP or ASP to write the results to a file or database on the server. Honestly I have absolutely no idea how to do this.

I am familiar with basic HTML but JS is a whole new planet for me. I have spend days trying to figure out the solution but still don't know what to do which is why any sort of help would be greatly appreciated.

Thanks in advance

03-11-2012, 05:29 PM
Type 'learn javascript' into google or go here http://www.w3schools.com/js/default.asp
For what you want to do, also learn ajax, here's a link to that http://www.w3schools.com/ajax/default.asp

And finally, yes you need to learn a server side language and a database language to store information. PHP here http://www.w3schools.com/php/default.asp and a start to mysql is here http://www.w3schools.com/sql/default.asp

That should take some time. Alternative is to hire a programmer.