automatic link execution after form submit
| From: | Fritz | Date: | Sat, 29 Mar 2003 19:26:13 +0000 |
| Subject: | automatic link execution after form submit | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-141603@lists.php.net to get a copy of this message | ||
Dear groupmembers.
I am stuck on "executing" automaticaly
a URL-string to be sent to a perl-script.
Explanation:
I have a form with one textfield.
After submittung the form I get
the variable $indicprop from that field.
$indicprop should now be sent automaticaly
within a query string of the sort:
/cgi_bin/myscript.pl/Search?search=
{field1}=~/$indicprop/i or {field2}=~/$indicprop/i
The only solution I came up with is
putting the string within a <a href=/cgi-bin/etc/...>Search NOW</> tag.
Can´t the click on this link be automated ?
Any hint is very appreciated.
Happy weekend, FritzPD: Following is the code I have so far. <? if ($sent) {
echo" <table class=SEARCH width=100% border=0 cellspacing=0>";
echo" <TR CLASS=LIGHT3D>";
echo" <TD><IMG SRC=/db4/icons/pixel.gif WIDTH=1 HEIGHT=1></TD></TR>";
echo" <tr><td>";
echo"<A HREF=/cgi-bin/farma2.pl/Search?search=
%7Bpropiedades%7D+%3D%7e+%2F$indicprop%2Fi+or+%7Bindicaciones
%7D+%3D%7E+%2F$indicprop%2Fi&sent=1><BIG><B>B U S C A R</B></BIG> por <font color=red>\"$indicprop\"</font> únicamente en campos INDICACIONES y PROPIEDADES</a>";
echo"<FORM><INPUT TYPE=SUBMIT VALUE=REGRESAR ONCLICK=history.go(-1)></FORM>";
echo "</td></tr><TR CLASS=DARK3D >";
echo" <TD><IMG SRC=/db4/icons/pixel.gif WIDTH=1 HEIGHT=1></TD>";
echo" </TR></table><BR>";
} else {
?>
<form action="<?php echo $PHP_SELF ?>">
<table class=SEARCH width=100% border=0 cellspacing=0>
<TR CLASS=LIGHT3D>
<TD><IMG SRC="/db4/icons/pixel.gif" WIDTH=1 HEIGHT=1></TD>
</TR>
<tr>
<td> Buscar únicamente en campos INDICACIONES y PROPIEDADES:<br>
<input name="indicprop" size=14>
<INPUT TYPE=HIDDEN NAME="sent" VALUE=1>
<input type=SUBMIT value='Preparar' name="SUBMIT">
</td>
</tr>
<TR CLASS=DARK3D >
<TD><IMG SRC="/db4/icons/pixel.gif" WIDTH=1 HEIGHT=1></TD>
</TR>
</table>
</form>
<?
} // if-else
?>