Jump to content
php.lv forumi

Aptaujas rezultati


Ingri

Recommended Posts

Sveiki,

<form action="fails.htm" method="post">
A:<input type="radio" checked="checked"name="razhotajs"value="A"><br>
B: <input type="radio"name="razhotajs" value="B"><br>
<input type ="submit" value ="Submit">
</form>

 

kaa var panakt, lai tiktu raadiiti rezultati shai primitivai aptaujai?

kas butu jaieraksta lai "fails.htm" stradatu un vel pie tam izdotu rezultatu (kaut kur,piemeram zem pashas aptaujas)=[[[[

 

 

with real respect,

Me_

Link to comment
Share on other sites

value nomainam uz INT tipu (A=1, B=2, ...)

 

$resArr = @ unserialize(file_get_contents('dati.dat'));
@ $resArr[(int)$_POST['razhotajs']]++;
@ file_put_contents('dati.dat',serialize($resArr));
@ printf( "A= %d<br />B= %d", $resArr[1], $resArr[2] /*...*/ );

Edited by Delfins
Link to comment
Share on other sites

×
×
  • Create New...