Hello,
I am using snoopy php class (http://sourceforge.net/projects/snoopy) to build a 'auto submitter' for an online form. to do so, I used an example code from the README page included in that class docs.
this is the example:
include "Snoopy.class.php";
$snoopy = new Snoopy;
$submit_url = "http://lnk.ispi.net/texis/scripts/msearch/netsearch.html";
$submit_vars["q"] = "amiga";
$submit_vars["submit"] = "Search!";
$submit_vars["searchhost"] = "Altavista";
if($snoopy->submit($submit_url,$submit_vars))
{
while(list($key,$val) = each($snoopy->headers))
echo $key.": ".$val."<br>\n";
echo "<p>\n";
echo "<PRE>".htmlspecialchars($snoopy->results)."</PRE>\n";
}
else
echo "error fetching document: ".$snoopy->error."\n";
while im trying to use this code for a regular form which has Text input boxes look like:
<input type="text" name="title" size="50" maxlength="50">
Then it works, all i need to do is edit the $submit_url and the $submit_vars array to the input 'name's.
The problem starts when i tried to use that class for input boxes which includes array's like:
<input type="text" name="title[]" size="50" maxlength="50" id="dt9" onchange="donh(this.id);">
<input type="text" name="url[]" size="30" id="du9" onchange="donh(this.id);">
I problem is that i dont know how to write the name of each of these input boxes in the $submit_vars array. i tried stuff like $submit_vars['name[id]'] = "something" (for example $submit_vars['title[dt9]'] = "blabla") but it didnt work. I need to know what is the syntax to do so.
This will really halp my project if someone could please help me.
Thank you in advance!!