RE:RE: [PHP] RE:Re: Problems processing a form; please help!

From: Date: Fri, 20 Oct 2000 15:22:23 +0000
Subject: RE:RE: [PHP] RE:Re: Problems processing a form; please help!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21393@lists.php.net to get a copy of this message
Ok, first I will try to get it running with a simple submit button, but the value of the submit button will also be passed as an argument, or am I wrong? So when I hit reload, there will be another vote... (submit will have a value of 1/on/true or whatever) I understand the session solution, you set a variable that is available and retains it's value during multiple pages. But I don't understand how this will work when using no session?!?!? I did try the unset() but the variable is always re-set when hitting reload... Never mind, I will RTFM. Thanks very much you all! Maxim Maletsky: >I am sure it will work with the image as well. > >All you need is to test it with a simple submit button first. if works then >go to research in HTML tutorials how to send the staff pressing an image >button and how to then get it's value (usually JavaScript gurus know that.) > >another way would be to control the submissions with sessions, or with the >same id: > >sessions: > >after the form is submitted assign a session for the user: > ><? >session_start(); >session_register('data'); > >if($data>0) > echo 'Man, it\'s '.$done.' times as you're trying already... > !'; >else >{ > ....processing the data:... > unset($done); >} > >if(!$done) >$done++; >?> > >It can be simpler of course, but this how I am having fun.. >Anyway, what you need to do is to give him a variable after registering the >submitted data. > >if you want then to allow him to submit something else somewhere else then >just remove if statement above.. > > > >-----Original Message----- >From: Kraa de Simon [mailto:Simon.de.Kraa@icl.nl] >Sent: Friday, October 20, 2000 9:23 PM >To: Hit Media >Cc: php-general@lists.php.net >Subject: [PHP] RE:Re: Problems processing a form; please help! > > >Hi, > >I already tried that, I named it test and tested on: if $test { include ... >}. > >Didn't work, so because of the url... > >http://localhost/ansilion/default.php?polls_sub_id=2&polls_top_id=1&x=26&y=5 > >...you keep on voting when you hit reload... > >Your idea will work if I can test on "if submit button (image in my case) >pushed >then process else !process". > >(Changed it to action="default.php"; makes no difference) > >Simon. > >Hit Media: >> >>>I'm using <form name="polls" action="default.php?" >>>method="get"> where >>>default.php is the page where you came from (can enter a vote). >> >> >>Why do you have a "?" after "default.php"? >>I've never seen that. >>Try it with no "?". >> >> >> >>> Maybe this is because I use an image as a "submit" button?!?! >>> <input type="image" name="test" >>> src="images/polls_submit.gif" >width="57" >>> height="14" border="0" alt=" Submit "> >>> So I can't really use the if ($submit) { } construction you >suggested?!?! >> >>I've never tried images as submit. >>Change its name to "submit" instead of "test" and see if my original >>idea >>works then? >> >> >> >> >Met vriendelijke groet / With kind regards, > >Simon de Kraa >ICL Logistic Systems >Simon.de.Kraa@icl.nl > >--- > >Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1a >SCO UnixWare 7.1.1, Progress 9.1a11 > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >For additional commands, e-mail: php-general-help@lists.php.net >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems Simon.de.Kraa@icl.nl --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1a SCO UnixWare 7.1.1, Progress 9.1a11

« previous php.general (#21393) next »