Calling a PHP function since javascript:onclick function..
| From: | Javier Morquecho Morquecho | Date: | Thu, 21 Sep 2000 16:16:21 +0000 |
| Subject: | Calling a PHP function since javascript:onclick function.. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3028@lists.php.net to get a copy of this message | ||
Hi you all..
I have worked about this, but I can't find the solution, help !!
How can I call a PHP function since a javascript:onclick function ??..
can I do something like ?:
<?
function save_fields()
{
<?
<script language=javascript>
echo "$f1=document.x.field1";
echo "$f2=document.x.field2";
</script>
$sql="insert into table1 values($f1, $f2)";
$result = pg_Exec($database, $sql);
}
?>
<body>
<form name=x>
<?
$database = pg_Connect("....");
echo "<input type=text name=field1> ";
echo "<input type=text name=field2>";
echo "<input type=button name=x2 onclick=save_fields()></br>";
?>
</form>
Thanks in advance...
Ing. J@vier Morquecho Morquecho
Tel : 177-10-87
Cel : 177-00-87
e-mail : jmorquec@cedetel.com.mx
e-movil : 5281770087@emovil.cedetel.com.mx
Home Cedetel : http://www.cedetel.com.mx
"#define QUESTION ((bb) || !(bb)) // Shakespeare"