Okay im doing a project for my FIRST robotics team where we are getting a scouting database going on where we scout out other teams
I have gotten the basics down but i am having multiple problems with my php code all i need to do is make my submit button work so that the variables that are inputed by the user are saved onto a txt file but if someone could help me output it onto another php page that would be even better. plz help here is my code.
<html>
<head>
<title>Scouting</title>
</head>
<body>
<?php
$myFile = "database.txt";
$fh = fopen($myfile,'w') or die("can't open file");
$stringData = "hello/n";
fwrite($fh,$stringData);
fclose($fh);
?>
<form method="post" action="<?php echo $PHP_SELF;?>">
Team Number:<input type="text" size="12" maxlength="12" name="Tnumber">:<br />
Special robot features::<br />
Xbox Kinect:<input type="checkbox" value="xbox" name="feature1[]">:<br />
autonomous:<input type="checkbox" value="autonomous" name="feature2[]">:<br />
Please choose where their autonomous period scores::<br />
top:<input type="checkbox" value="top" name="autonomous1[]">:<br />
middle:<input type="checkbox" value="middle" name="autonomous2[]">:<br />
bottom:<input type="checkbox" value="bottom" name="autonomous3[]">:<br />
<textarea rows="5" cols="20" name="comment" wrap="physical">Enter any comments about the team here</textarea>:<br />
<input type="submit" value="submit" name="submit">
</form>
<?
} else {
echo "$Tnumber";
echo "$feature1";
echo "$feature2";
}
echo "$autonomous1";
echo "$autonomous2";
echo "$autonomous3";
echo "$comment";
}
?>