View the page by following the links from here to the online form: www-stu.sel.cam.ac.uk/societies/scms/indexjoin.html (sorry about frames and clumsy formatting/coding/general rubbishness this was my first ever page!)
Thanks in advance for your help!
Here is the relevant code 1)/////////////From the HTML form:
<form name="application" method="post" action="form.php">
Forename Surname
<br>
<SELECT NAME="Title[]" SIZE="1">
<OPTION SELECTED>Mr.
<OPTION>Mrs.
<OPTION>Ms.
<OPTION>Miss.
<OPTION>Dr.
<OPTION>Prof.
<OPTION>Rev.
</SELECT>
<INPUT TYPE="text" NAME="forename" SIZE="30" >
<INPUT TYPE="text" NAME="surname" SIZE="30">
<br><br>
<INPUT TYPE="radio" NAME="type" VALUE="Student"> Selwyn Student
<br>
<INPUT TYPE="radio" NAME="type" VALUE="Fellow"> Fellow/Fellow's Partner
<br>
<INPUT TYPE="radio" NAME="type" VALUE="External"> External (non-Selwyn)
<br>
<br>Contact telephone number E-mail address
<br>
<INPUT TYPE="text" NAME="phone" SIZE="30">
<INPUT TYPE="text" NAME="email" SIZE="30">
<br><br><hr width=100%><i>For external members only</i><br><br>Address including postcode<br>
<TEXTAREA NAME="address" ROWS=6 COLS=30>
</TEXTAREA>
<br><br><hr width=100%><i>For student members only</i><br><br>Instrument(s) played and approximate standard reached<br>
<TEXTAREA NAME="instruments" ROWS=6 COLS=30>
</TEXTAREA>
<br><INPUT TYPE="checkbox" NAME="interested" VALUE="yes">I would be interested in playing in future SCMS orchestral concerts
<br><br><hr width=100%><br>
2)//////////////////////from the php script page
<?php
$dbconnect=mysql_connect("localhost", "scms", "Changeme");
if (!$dbconnect)
{echo("<p>Unable to connect to the database server at this time.</p>"); exit();}
else {echo("<p>Connected to mySQL database on server...</p>");}
mysql_select_db("scms");
if (!@mysql_select_db("scms") )
{echo("<p>Unable to locate the SCMS database at this time.</p>"); exit();}
else {echo("<p>Using SCMS database...</p>");}
$sql="INSERT INTO scms SET
title='$title',
forename='$forename',
surname='$surname',
phone='$phone',
email='$email',
type='$type',
address='$address',
instruments='$instruments',
interested='$interested'";
if (@mysql_query($sql))
{echo("<p>Succesful!</p>");}
else {echo("<p>Error:" . mysql_error() . "</p>");}
?>