473,795 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Noob query: Voting or Poll Scripts

Hello All:

I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).

It seems that this can be done (using file instead of a DB), but I don't
want to re-invent the wheel. So if someone has a suggestion, please help
me out.

Best regards,
Animesh
Feb 14 '07 #1
3 1717
Message-ID: <eq**********@a gate.berkeley.e dufrom Animesh K contained
the following:
>I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
I wrote a poll which enabled you to have as many polls as you like using
just two tables. I suspect others will be similar. Also you can have
many tables in a database (I usually just use a naming convention to
keep them separate.)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Feb 14 '07 #2

Animesh K wrote:

Hello All:
I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
It seems that this can be done (using file instead of a DB), but I
don't
want to re-invent the wheel. So if someone has a suggestion, please
help
me out.
Best regards,
Animesh
10 databases is not really a problem here. You can identify tables that
belong to a single script inside a single database using a unique name
prefix. This is how it has been done years ago when a single MySQL
database that your host allowed was look upon as a huge favor.

In any case, if you are trying to avoid using a database, you will need
your script to be able to write onto the hard drive and that creates
possibility for NASTY website hacks. I would avoid a script that
unnecessarily writes anything to a disk. Don't shy away from database use.
There are plenty of benefits there.

As for where to get a ready-to-go script, www.hotscripts.com has plenty.

--
Cheers,
Dmitri
See Site Sig Below
--
+------------------------------------------------+
| Follow comp.lang.php threads |
| with your Firefox Live Bookmarks! Set it up at |
| http://www.1-script.com/forums/ |
+------------------------------------------------+

Feb 14 '07 #3
www.1-script.com wrote:
Animesh K wrote:

>Hello All:
>I am new to Php, but working my way out slowly. I saw some polling or
voting scripts on the net and all of them use MySQL database with it. I
>was wondering if a file can be used (to save use of a database, I have
only 10-databases from godaddy and I cannot use one for each poll).
>It seems that this can be done (using file instead of a DB), but I
don't
want to re-invent the wheel. So if someone has a suggestion, please
help
me out.
>Best regards,
Animesh

10 databases is not really a problem here. You can identify tables that
belong to a single script inside a single database using a unique name
prefix. This is how it has been done years ago when a single MySQL
database that your host allowed was look upon as a huge favor.

In any case, if you are trying to avoid using a database, you will need
your script to be able to write onto the hard drive and that creates
possibility for NASTY website hacks. I would avoid a script that
unnecessarily writes anything to a disk. Don't shy away from database use.
There are plenty of benefits there.

As for where to get a ready-to-go script, www.hotscripts.com has plenty.
Thanks for the quick reply. I will adhere to your and Geoff's suggestions.

Best regards,
Animesh
Feb 14 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1703
by: Michael | last post by:
Hi, I am looking for a poll script with a special feature. Normally poll scripts display for every answer option ONE bar according to how many votes the answer got. I am looking for a script where you have TWO bars, one displaying the number of answers from men and one for the answers from women. I would be very grateful if anybody had already heard of this kind of script and knows where to find it.
10
2903
by: windandwaves | last post by:
Hi Folk I am developing a voting / polling system. Eg. Who is your favourite sport star: a. mike b. sara c. frank
5
2430
by: george | last post by:
Hi All I've used couple of GPL/free voting scripts (some of these are very good), but need to create/find one that allows users to add a new answer. For example: This is a voting question - which answer is the best? a) answer a b) answer b c) add your own answer, vote for it and allow next voter to see this answer as voting option.
3
479
by: bungle bonce | last post by:
I have used the usual method of calculating age from DOB and placed it on a form, I now need to use this in a query, or place the data in a table so I can then query it. I am a noob so be gentle please. TIA
10
2620
by: Marek Zawadzki | last post by:
Hi all. Is it possible to implement an accurate voting mechanism (think digg.com) that does not require users to sign in before voting? I think for many people registering is pain and thus they rarely give their votes online. Just look at digg and compare the number of votes to the number of people visiting their website. IOW what if somebody needs votes but cannot afford to bother users with registration process?
1
1975
by: Japskunk | last post by:
I am having trouble updating a SQL table through the GridView "Auto" Enable Edit Feature... I am connecting to a SQL 2000 Server with a SQLDataSource I have created the Update Query in the Command and Parameter Editor setup when I created my SQLadapter, along with Select and Delete. Here is the Update Command: UPDATE TBLUPSData SET UPSModel = @original_UPSModel, UPSLocation = @original_UPSLocation, UPSDeviceAttached =...
0
1130
by: Mirce | last post by:
I have installed a phpBB2 forum at next URL: http://www.hcu.untz.ba This site is dedicated to handicapped persons. I have posted a poll at this site. The results of voting on poll questions are displayed as integer. I would like to display voting results as floating-point numbers. However, I don't know where is placed a file (or template) in which the calculations of voting are done. Please help me to change the display format of voting...
3
1310
by: aalmakto | last post by:
Hi folks, Just wondering if there are any php polling scripts that can be used for this type of situation. My site allows people to set up their own Website with no coding whatsoever. I need a polling script that will allow users to choose write a question and some Answers (a poll) that is displayable on their Website. Anyone know of a poll that allows this? Or maybe one that can be easily modified to support this functionality. ...
1
3188
by: christam1 | last post by:
Hi there, I'm creating a PHP/XML-based voting system. There are 24 options for a user to vote from, and ideally I'd like the user to see a picture of each person they vote for. So far, I've managed to list all the names of people up for voting from a "poll.xml" file in my "poll.php" file which is what web users will go to in order to vote. It also correctly updates the tally in the XML file when a person is voted for. The only thing that doesn't...
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10436
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.