|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
graphics not showing
I tested your codes, everything works fine but graphics not showing, what will be the reason ?
is it because it is just a single response? |
|
#2
|
|||
|
|||
|
Image problems too
Yup...have the same issue. I've checked the code for HTML issues and it all looks right. I've also chmod'd the image to 777 - nothing can stop it there.
Seems to be in the code that is generating the image...I'll keep looking, but it's not obvious to me yet... |
|
#3
|
|||
|
|||
|
Re: Image problems too
Should have added this to the first message - the code works perfectly! I've just installed this on my OSX box with PHP and MySQL and it just ran. Now to take it apart and play with things...
This is a great way to learn - Thanks DevShed!! |
|
#4
|
|||
|
|||
|
Re: graphics not showing
You need to make sure that your version of PHP includes support for image generation via the GD library. If not, image generation will fail.
icarus, Melonfire http://www.melonfire.com/ |
|
#5
|
|||
|
|||
|
Re: graphics not showing
<p><pre><font color=#008000><xmp>
echo |
|
#6
|
|||
|
|||
|
Graphics
<p><pre><font color=#008000><xmp></xmp></font></pre><p>
<!-- Code --> <p><pre><font color=#008000><xmp></xmp></font></pre><p> <!-- Code --> <p><pre><font color=#008000><xmp> $barlen=200; $barheight=10; <IMG SRC= |
|
#7
|
|||
|
|||
|
it worked, Thanks
yes, it worked as you suggested.
Thanks |
|
#8
|
|||
|
|||
|
can it be done in....asp or javascript?
Could this polling be done in ASP and or JavaScript?
A simple 'yes' is not enough :) |
|
#9
|
|||
|
|||
|
Re: can it be done in....asp or javascript?
ASP> You're probably better off checking with an ASP board (not to sound rude). I have no experience with ASP
Javascript> No. You can't store the state of the poll (that I know of) between people. if there's only one person doing the poll, then yes (Cookies?). Javascript that allows writing to the server side would probably be .jsp (that may be possible). Java would also be possible (Drag/Send data to specialized 'daemon' - which I guess in hindsight,could be done via Javascript too) - but again This would not be a pure-javascript solution (but it CAN be a pure-java solution. Client/Server model. |
|
#10
|
|||
|
|||
|
Can this be adapted for multiple questions? How?
Hi,
This is a great example of a single question poll...but what if I wanted to ask a bunch of questions from the user? mto |
|
#11
|
|||
|
|||
|
substitute for GD graph
I wrote a poll script a while back, and I used an alternative to the GD graph in this tutorial. Create any colour of a 1x1 image, and when you show results it made the width of the image the integer of the percentage, and filled in the rest with a gray pixel image. It's a great alternative to people without GD image creation software.
|
|
#12
|
|||
|
|||
|
Re: substitute for GD graph
The easiest way to produce a bar graph is this:
<img src="image.gif" width="<? echo $width; ?>" height="10"> where image.gif is a 1x10 pixel gif. |
|
#13
|
|||
|
|||
|
Re: Can this be adapted for multiple questions? How?
Yeah, you'll need to do a bit of modding, but it isn't too tough. Here's what I did on devexplore.com, I coded my entire poll script.
Instead of creating a question column for each question, instead just create a TEXT column. This column can be filled with a bunch of questions. Then, all you have to do is separate each question in the text by some token terminator, like newline (\n). So, the question TEXT column would look something like 'Yes\nNo\nSometimes\nRarely'. Then, all you have to do is split the column up using split( "\n", $question ) and you're set. The only other thing is that you will need another TEXT column to store the number of votes. Just follow the same method. Check out my site with my poll, www.devexplore.com -John |
|
#14
|
|||
|
|||
|
Re: Can this be adapted for multiple questions? How?
Thanks John,
I'll check it out! mto |
|
#15
|
|||
|
|||
|
no graphics
We shoud use only tables.
tables whith 2 colums and 1 rows, instead of image, and we will add a bgcolor to one of teh cells and it will be OK... :) good luck. |
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Democracy, The PHP Way |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|