I run a couple of fantasy leagues and it became apparent that PHP would be a great addition to my sites. Since i'm still very new at this, i figured i'd start small. So i'm starting with a FORM SUBMISSION script.
I've been looking around at the scripts online and trying to adjust to my personal likings. I did find one that seemed pretty straight forward. I figured out the fields that i could change to suit me.
I tried plugging the script into a template page for my site. it's at http://www.trffl.com/lineup.shtml
Two things:
1. I can't figure out for the life of me, why the SUBMIT LINEUP button is in the middle of the form and cutoff. I'd obviously like it to be at the bottom inside the table.
2. How do I get the button to actually do something?
As I said, I downloaded this script and it came with the following files:
advanced.log
advanced-email.txt
advanced-email-autorespond1.txt
advanced-email-autorespond2.txt
advanced-error.html
advanced-logfile.txt
advanced-thank-you.html
form.cfg
index.html
style.css
I took the code from the index.html file. I will upload the style.css file. I've edited the txt files to put in the info I want. I do not know what to do with the FORM.CFG file.
Here is the code for the page:
Code: Select all
<!--#include virtual="/test/header1.html" -->
<!--#include virtual="/test/header2.html" -->
<!--#include virtual="/test/leftnav.html" -->
<td width="10" valign="top" align="right"></td>
<td vAlign=top bgcolor="#ffffff">
<table align="left" width="100%" cellSpacing="0" cellPadding="2" border="0" bordercolor="red">
<tr>
<td>
<!--Heading Start-->
<table width="500" align="center" border="3" bordercolor="#425A72" cellpadding="5" cellspacing="0" bgcolor="#425A72">
<tr>
<td align=center><font face="verdana" size="5" color="ffffff"><b>Submit Lineup</b></a></td>
</tr>
</table>
<!--Heading End-->
<br>
<!--2003-04 Start-->
<table align="center" width="500" cellspacing="0" cellpadding="2" border="2" bordercolor="#425A72">
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td><a NAME="lineup"></a>
<td class="bhead"><b>Attention:</b> Please use your valid Pittsburgh Fantasy Baseball League email address. This script will send the results of the processing to the entered email.</td>
<form name="Simple" method="post" action="/cgi-bin/formprocessorpro.pl">
<p align="center"> <font size="2">
<input type="hidden" name="base_path" value="../sample-forms/advanced-form">
</font></p>
<table border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td align="right" class="maintext"> </td>
<td><font color="#FF0000">All fields are required</font></td>
</tr>
<tr>
<td align="right" class="maintext">Name : </td>
<td><font size="2">
<input type="text" name="r_Name" maxlength="64" size="45" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">Team Name : </td>
<td><font size="2">
<input type="text" name="Team-Name" maxlength="64" size="45" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">Week # : </td>
<td><font size="2">
<input type="text" name="Week" maxlength="64" size="45" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">Opponent : </td>
<td><font size="2">
<input type="text" name="Opponent" maxlength="64" size="45" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">Contact eMail : </td>
<td><font size="2">
<input type="text" name="re_eMail" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext"> </td>
<td> </td>
</tr>
<tr>
<td align="right" class="maintext"> </td>
<td> <font color="#FF0000">Please include Player Name and Team.</font></td>
</tr>
<tr>
<td align="right" class="maintext">C : </td>
<td><font size="2">
<input type="text" name="C" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">1B : </td>
<td><font size="2">
<input type="text" name="1B" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">2B : </td>
<td><font size="2">
<input type="text" name="2B" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SS : </td>
<td><font size="2">
<input type="text" name="SS" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">3B : </td>
<td><font size="2">
<input type="text" name="3B" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">OF : </td>
<td><font size="2">
<input type="text" name="OF1" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">OF : </td>
<td><font size="2">
<input type="text" name="OF2" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">OF : </td>
<td><font size="2">
<input type="text" name="OF3" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">OF : </td>
<td><font size="2">
<input type="text" name="OF4" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">UT : </td>
<td><font size="2">
<input type="text" name="UT" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SP : </td>
<td><font size="2">
<input type="text" name="SP1" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SP : </td>
<td><font size="2">
<input type="text" name="SP2" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SP : </td>
<td><font size="2">
<input type="text" name="SP3" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SP : </td>
<td><font size="2">
<input type="text" name="SP4" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">SP : </td>
<td><font size="2">
<input type="text" name="SP5" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">RP : </td>
<td><font size="2">
<input type="text" name="RP1" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
<tr>
<td align="right" class="maintext">RP : </td>
<td><font size="2">
<input type="text" name="RP2" size="45" maxlength="64" style='border: 1 outset rgb(50,50,50);'>
</font></td>
</tr>
</table>
<div align="center">
<p>
<font size="2"> <br>
<input type="submit" name="Submit" value="..:: SUBMIT LINEUP ::.." class="buttons">
</font>
</p>
</div>
</form>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--2002-03 End-->
<br>
<!--NFL Weekly Schedule End-->
</td>
</tr>
</table>
<!--keep this closing-->
</td>
</tr>
</table>
<!--keep this closing-->
<!--#include virtual="/test/footer.html" -->Sorry for the long post.
Am I over my head? Is this something that can easily addressed by one of you guys?
Thanks for any guideance!!!