I have shown some code here. What I want to do is call a php function called add_artist from my form. This doesn't seem to work. I can call javascript functions just fine though. How are php functions called from html? The button is btnAddNew. I have set the onClick to supposedly call the php function.
<?php
include 'loadext.php'; // sql server
include 'styleinput.php';
define("reportheading", "<h1 class=style1center>Artist Input Form</h1>");
print reportheading;
function add_artist()
{
load_ext(0);
$msconnect=mssql_connect ("aptiva-2000","recordings","sa");
$boolval = mssql_close($msconnect);
}
?>
<form name="artistinputform" action="inputaccept.php" method="post" style='background-color: black;'>
<table border=1 bordercolor=yellow cellpadding=0 cellspacing=0 align=center height=70% bgColor=yellow>
<tr><td>
<table border=0 cellpadding=3 cellspacing=5 height=98% bgColor=green>
<tr><td valign=top>New Artist: </td>
<td valign=top> <Input Type="text" name="artist" size="40" maxlength="50" value=" ">
<td valign=top> <INPUT TYPE="button" NAME="btnLoadNew" class="button" value="Load" onClick="add_artist()" tabindex="-99" onMouseOver='style.fontWeight="bold"' onMouseOut='style.fontWeight="normal"'> </td></tr>
</td></tr></table>
</body>
</html>