Damn I should stop typing after 3 am, Ok so here it goes, If you go here:
http://gamedestroyers.com/dev/counter/
I need to be able to select more than one checkbox, input more than one value in my text box, click change and insert the information in to a gdbm binary file. I have my checkbox and value boxes named like so:
Code: Select all
// $val is the url to the page with the counter ie /dev/counter/index.php
<input type=checkbox name=theurlї] value=$val>$val</td>
<input type=text name=valueї]>
Now when I process my form I cant figure out how to pack that information and insert it to the gdbm file:
Code: Select all
elseif ( ($mode == "Change") && ($theurl) && ($value) )
{
//
// We are going to change the count for a current counter.
//
$dd=dba_open("$counter",'w','gdbm') || print "No dbm\n";
$url = implode(",",$theurl);
$newcount = implode(",",$value);
$now=time();
$packed=pack("ii",$newcount,$now);
echo $url;
echo $newcount;
print("<center><strong>changed the url $url to $newcount at $now</strong></center><BR>\n");
dba_replace($url,$packed,$dd);
Now that I am using the implode(",",$theurl); I can acutally get it to insert in to one value, I just cant figure out how to make a loop so while I have a valid $theurl and a valid $value, I do the dba_replace for each.
Did I even said that correctly?