Page 1 of 1

order form help

Posted: Wed Feb 07, 2007 5:18 pm
by techker
hey guys i have this order form

http://techker.vipzone.biz/enligne.php

Code: Select all

<?

// Enter your Email below
$myemail = "";
$ipi = getenv("REMOTE_ADDR");
if ($Submit)
{
	if(!trim($visitor_name))
	{
		$message = "<font color=red>Ton nom?</font>";
	}
	else
	if(!trim($visitor_email))
	{
		$message = "<font color=red>Ton email?</font>";
	}
	else
	if(!trim($visitor_message))
	{
		$message = "<font color=red>Ton messages?</font>";
	}
	else
	{
		$todayis = date("l, F j, Y, g:i a");
		$subject = "Commende en ligne";
		$email_message = "Visitor mail \r Messsage: \r $visitor_message \r Visior IP: $ip \r Email $visitor_email\r Messsage: \r $visitor_comments  ";
		$from = "De: $visitor_name<$visitor_email>";
		mail ($myemail,$subject,$email_message,$from);
		$status = "sent";
	}
}
?>

<!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>ORDER FORM</title><style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
.style1 {color: #0000FF}
.style2 {color: #003399; }
-->
</style></head>

<body>
<table width="530" height="746" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#eaedef">
  <tr>
    <td width="13" valign="top" bgcolor="#003399">&nbsp;</td>
    <td width="507" height="19" valign="top" bgcolor="#003399">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#003399">&nbsp;</td>
  </tr>
  <tr>
    <td width="13" valign="top" bgcolor="#003399">&nbsp;</td>
    <td height="708" valign="top" background="finisht/members/images/feature_bg_bgw.gif"><table width="496" height="708" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="496" height="708" valign="top"><?
if ($status == "sent")
{
	?>
<div align="center">
	<span class="style2">Merci <? echo $visitor_name ?></span>(<? echo $visitor_email?>)<span class="style2"><br>
	Votre commande &agrave; &eacute;t&eacute; envoyer!<br>
	<br>
	Votre IP: <? echo $ip ?>	</span><br>
	</div>
	<?
}
else
{
	?>
	<div align="center"><? echo $message ?></div>
	<form method="post" action="<? echo $_SERVER['finisht/members/PHP_SELF'] ?>">
	<input type=hidden name="ip" value="<?php echo $ipi ?>">
  	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="center" class="style1"></div>        
    <div align="center" class="style1"></div></td>
    </tr>
    <tr>
    <td><div align="center"></div></td>
    </tr>
    <tr>
    <td><div align="center" class="style2">Name</div></td>
    </tr>
    <tr>
    <td><div align="center">
    <input name="visitor_name" type="text" id="visitor_name" value="<? echo $visitor_name ?>">
    </div></td>
    </tr>
    <tr>
    <td><div align="center" class="style2">Email      </div></td>
    </tr>
    <tr>
    <td><div align="center">
    <input name="visitor_email" type="text" id="visitor_email" value="<? echo $visitor_email ?>">
    </div></td>
    </tr>
    <tr>
    <td><div align="center" class="style2">Your order  (Please don't forget the QTY) </div></td>
    </tr>
    <tr>
    <td height="179"><div align="center">
      <textarea name="visitor_message" cols="50" rows="15" id="visitor_message"><? echo $visitor_message ?>
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY: 
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:
Item#                                       QTY:</textarea>
    </div></td>
    </tr>
    <tr>
    <td height="97" valign="middle"><label><span class="style2">COMMENTS</span>
        <textarea name="visitor_comments" cols="60" rows="5"id="textarea"><? echo $visitor_comments ?>
Please do not forget your phone number.thx
#</textarea>
    </label></td>
    </tr>
	
    <tr>
    <td><div align="center">
    <input name="Submit" type="submit" id="Submit" value="SEND">
	<input type="reset" value="RESET">
    </div></td>
    </tr>
  	</table>
	</form>

	<?
}
?></td>
      </tr>
    </table></td>
    <td width="10" valign="top" bgcolor="#003399">&nbsp;</td>
  </tr>
  <tr>
    <td width="13" valign="top" bgcolor="#003399">&nbsp;</td>
    <td height="19" valign="top" bgcolor="#003399">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#003399">&nbsp;</td>
  </tr>
</table>
</body>
</html>
se the probleme is that it is very ugly and hard to read when i receive it in my emails.

i need help for the reason that i wold like to make this form in one.not seperated.

or if there is one that is already made .

any body have an idea how i could make it nicer?

thx for the help.

Posted: Wed Feb 07, 2007 7:16 pm
by superdezign
I don't know what you're asking, or why you're giving us this code, but as for the readability of your e-mail, use newlines (\n) and formatting of "Form Name: ".$fieldValue."\n" for each field value.