thanks so much for your help, I'm getting closer, I think to figuring this out...I've followed your suggestions, here is my code now (all in one index.php file):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Uncle Ed for Congress!</title>
<style type="text/css">
body {
background-image: url(UncleEd.jpg);
background-repeat: no-repeat;
width: 865px;
height: 570px;
margin: auto;
}
#poll {
width: 250px;
position: absolute;
top: 405px; left: 510px;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #000000;
font-size: 13px;
}
</style>
</head>
<body>
<?php
/** Check to see if there has been a POST (submit has been clicked) **/
if(isset($_POST['mySubmit'])
/** Submit has been clicked -- connect to the database and insert **/
/** THIS IS NOT SAFE -- ALWAYS(!!!) VERIFY INPUT FROM THE USER **/
[COLOR=DarkRed]$stuff = $_POST['myInput'];[/COLOR]
/** This is how you can connect **/
mysql_connect('localhost', 'uncleed', 'edgar') or die(mysql_error());
mysql_select_db('uncleed') or die(mysql_error());
/** now you are connected and can do your inserts like you are used to **/
mysql_query("INSERT INTO table (stuff) VALUES ('$stuff')");
} else {
/** Nothing has been posted, show the user the form **/
?>
<div id="poll" align="center">
<form name="edVotes" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table border="1" cellpadding="5" cellspacing="0" style="margin-bottom: 5px;">
<tr><td bgcolor="#FFFFFF">Should Uncle Ed run for Congress?</td></tr>
<tr><td bgcolor="#FFFFFF" align="center">
<input type="radio" name="answer" value="Yes">Yes
<input type="radio" name="answer" value="No">No</td></tr>
</table>
<input type="submit" name="mySubmit" value="Submit" />
</form>
<?php
} /** this ends our conditional **/
?>
</div>
</body>
</html>
I get the following errors...I think I fixed the first, the second though, I don't know what it means or how to fix it without messing with the other code:
Parse error: parse error, unexpected '{' in /usr/home/uncleedforcongre/www/index.php on line 34
Parse error: parse error, unexpected T_VARIABLE in /usr/home/uncleedforcongre/www/index.php on line 37 (in red above)