Hi everyone,
I've written up the basic code for my get.php script, but it doesn't seem to be working. I keep getting error: undefined index in all the lines that $_POST is on. What could be wrong?
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Coyote Product Submit Form</TITLE>
</HEAD>
<BODY>
<H3 ALIGN="center">Coyote website product submit form</H3>
<FORM ACTION="get.php" METHOD="post" ENCTYPE="text/plain">
<TABLE>
<TR>
<TD> <B>Location of product:</B> <INPUT NAME="Productl" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Description:</B> <INPUT NAME="Description" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Make:</B> <INPUT NAME="Make" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Model:</B> <INPUT NAME="Model" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Year:</B> <INPUT NAME="Year" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Color:</B> <INPUT NAME="Color" TYPE="text" SIZE="20">
<BR>
<BR>
<B>Suggested list price:</B> <INPUT NAME="Suggested list price" TYPE="text" VALUE="$0.00" SIZE="15">
<BR>
<BR>
<B>Inventory Type:</B> <INPUT NAME="Inventory Type" TYPE="text" VALUE="Container, Truck, Reefer etc." SIZE="24">
<BR>
<BR>
<B>Serial #:</B> <INPUT NAME="Serial #" TYPE="text" VALUE="#" SIZE="30">
<BR>
<BR>
<B>Name of submitter:</B> <INPUT NAME="Full name" TYPE="text" SIZE="20"></TD>
</TR>
<TR>
<TD ALIGN="center"><INPUT TYPE="submit" VALUE="Submit" STYLE="color: #ffffff; background-color: #000000"></TD>
</TR>
</TABLE>
</FORM><A HREF="index.htm">Click Here</A> to submit another product to the site.
<BR>
<BR>
<BR>
<H3 ALIGN="center">Instructions</H3>
<BR>
<BR>
<H5>1: Enter all required information into the text box. Avoid leaving blank spaces.
<BR>
<BR>
2: Once you are completed, press the 'Submit' button. This will then open your e-mail client. Now you should see some text already already in the email.
<BR>
<BR>
3: Now, add an attachment to the email. The attachment should be picture of the object that you want to sell.
<BR>
<BR>
4: Send The email. (It will automatically be sent to the appropriate address)
<BR>
<BR>
5: If you need assistance understanding the text boxes, please visit <A HREF="submit_help.htm">This Page</A>
<BR>
<BR>
6: The information will soon be added to the site.</H5>
<BR>
</BODY>
</HTML>
get.php
<?php
//Start of the PHP script
$ProductL = $_POST["Productl"]; //Gets all the variables
$Desc = $_POST['Description'];
$Make $_POST['Make'];
$Model = $_POST['Model'];
$Year = $_POST['Year'];
//Echo to the user
echo "<BR /><b>Product Location:</b>$ProdductL";
echo "<BR /><b>Description:</b>$Desc";
?>