Web Hosting Talk







View Full Version : 2 scripts affecting each other: HELP!


Chaps
09-07-2002, 04:53 PM
I have a php poll script on my main page that when you vote, it refreshes the page and the reults appear on the same page in the same spot as the poll...and i put my e-mail login script on the same page. When i enter my e-mail user and password and hit submit...it just refreshes the page and shows the poll results...THEN if I enter my e-mail info in again, it'll work. Anybody know whats up?

http://www.riderfans.com/newdesign/index.php

Thanx to anyone who can help!

oh and on another note if the poll results are being shown and you try to refresh the page...it has the warning and if you hit retry to refrsh...it adds another vote to the poll...how do I stop this

ranchoweb
09-07-2002, 06:00 PM
hey, you have 3 seperate forms on the page, but you did not close the second form (the one to view poll results.) So submitting an email and pressing the button actually submits the form to view poll results.

I believe all you need is a </FORM> tag after this:

<FORM ACTION="index.php" METHOD=POST>
<INPUT TYPE=HIDDEN NAME=Votes VALUE=TRUE>
<INPUT TYPE=HIDDEN NAME=Voted VALUE=TRUE>
<INPUT TYPE=SUBMIT VALUE=Results>

Chaps
09-07-2002, 06:45 PM
I'll try it...thanx for the heads up! I'll let you know if it works!

Chaps
09-07-2002, 06:45 PM
GREAT! It worked! Thanx for the heads up on my overlooking! :) :cool: :)

ranchoweb
09-08-2002, 05:34 AM
you're welcome!:)