sql Code:
CREATE TABLE `polls` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`title` varchar(20) NOT NULL,
`options` varchar(2000) NOT NULL,
`amount` varchar(36665) NOT NULL,
)ENGINE=INNODB
First off, this is honestly no way to make a poll. Your title should be varchar(255), options should be a longtext and as for amount, I seriously don't know what you want with this one.
Do not be scared of making more tables. A poll can easily take up 2 or more database tables. First the cats, then the poll itself, the options and the votes and so on. Maybe even a configurationtable for the options.
I would first have to know what is in your database and how it is composed. I do not think this is the right approach. You keep checking if there is data but the poll can't exist without data, so the checks are useless. Make sure you do not use the $_GET['id']. Or only when it's directly linked to. That'll be OK.
I think your first step it to take it from the ground up again and make sure every time you echo something making sure the script is working.
Quote:
Originally Posted by Tanax
Orc.. it's fine that you're looking for support for your codes, but you don't have to PM me everytime you create a new thread.. I'm sure people will find their way to the thread anyways 
|
When you make a post like that, you could've easily helped him out.