Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Rons Guide: Flat File Poll
Old 05-23-2005, 02:53 PM Rons Guide: Flat File Poll
vsjames's Avatar
Novice Talker

Posts: 8
Location: Uk
Trades: 0
Nobody has really helped me out at Rons Guide for this question so I will ask it here instead. At Rons Guide there is a tutorial about creating flat file polls.
It almost all works but I don't know where to edit one thing. Please have a look at the page below and either answer my question here or there - my name at Rons Guide is 'James'.

http://ronsguide.com/index.php?page=...fpoll&start=70

Please take a few moments to read though what I have written there and look at Page 9 too. Please note that the link I provided there is no longer active.

Thank you.


- James
vsjames is offline
Reply With Quote
View Public Profile Visit vsjames's homepage!
 
 
Register now for full access!
Old 05-23-2005, 07:11 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
hi James

It usually makes me ponder that when people release their so called "scripts" that they don't test it completely inside and out, and rarely consider those people that may not be very experienced in PHP!

Anyway, Ron is trying to tell you to change the "action" (or the taret) of where the information from the form should be parsed to. David has said you need to direct it to vote.php so lets do that.

HTML Code:
<form action="vote.php" method="post">
Put that there instead of the $_SERVER['PHP_SELF']; (which by the way is a predefined variable and returns the path of the PHP script calling upon it, but we don't need it!)

This should work out fine, provided that vote.php and index.php (i assume that's where the voting form is) are in the same directory on your server.

Hope thats works out for ya! Post back either way.
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 05-24-2005, 02:13 PM
vsjames's Avatar
Novice Talker

Posts: 8
Location: Uk
Trades: 0
Thank you very much indeed for that fast and very helpful reply! I got it working, however one last thing... When someone votes in the poll, there is eparate results page. According to Rons Guide, he uses practically the same code as the one in his tutorial apart from adding some comments code. How can I get it so that when you click 'vote', instead of having a results page, to have the poll reloaded with the results in it.?

For a proper example vote in my poll and Rons Guide poll and see the difference in how the results are displayed? I don't want a results page - I'd like it how Ron does it.

http://www.rcthaven.com/staff.php


Thanks!

James
vsjames is offline
Reply With Quote
View Public Profile Visit vsjames's homepage!
 
Old 05-25-2005, 06:14 AM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
It's actually more complex than you think to do that. You'd have to set a cookie to say that they've voted (i'm not sure if Ron has already done this in his code) and then put in a case argument in the code that usually shows the poll choices - to instead show the results in the box, if the cookie has been set.

Try looking around for some tutorials on cookies, are you familiar with case arguments (if-then-else) ??
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 05-25-2005, 02:38 PM
vsjames's Avatar
Novice Talker

Posts: 8
Location: Uk
Trades: 0
Yes, I rcently bought a 'PHP teach yourself book' and am now familiair with those case arguments.


James
vsjames is offline
Reply With Quote
View Public Profile Visit vsjames's homepage!
 
Reply     « Reply to Rons Guide: Flat File Poll
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.16401 seconds with 12 queries