You are here: arrays and variables « PHP Language « IT news, forums, messages
arrays and variables

Posted by ozgur teksin on 07/12/05 17:18

Hi guys,

Thanks for your help.

Can anyone tell me what is wrong with this script. Because I couldt send the
values of Name_2 or Name_3 when I submit the form and check the email.
This is just a piece of my html and my php code. Name_2 ....... Name_200.
Thanks again in advance


for example

Name : whatever
Res Phone : 9458943
Email : whatever@whatever
Bus Phone : 9489584
The Total is 230

I would like to get by submission

Name : whatever
Res Phone : 9458943
Email : whatever@whatever
Bus Phone : 9489584
Bookshelves : 130
Chair : 60
Chair Rocker : 40
The Total is 230

Here is my html

<form method="POST" name="EstimationForm" action="estimate.php">
<input type="text" name="GI_name" size="24" class="txt2">
<input type="text" name="GI_resphone" size="24" class="txt2">
<input type="text" name="GI_email" size="24" class="txt2">
<input type="text" name="GI_busphone" size="24" class="txt2">

<input type="text" size="2" maxlength="3" name="item_2" class="txt2"><input
type="hidden" name="Weight_2" value="65">
<input type="hidden" name="Name_2" value="Bookshelves, per section"></td><td
class="txt3">

<input type="text" size="2" maxlength="3" name="item_3" class="txt2"><input
type="hidden" name="Weight_3" value="60">
<input type="hidden" name="Name_3" value="Chair, Arm"></td>

<input type="text" size="2" maxlength="3" name="item_4" class="txt2"><input
type="hidden" name="Weight_4" value="40">
<input type="hidden" name="Name_4" value="Chair Rocker (wood)"></td>


my php script
<?
$FTGGI_name = $_POST['GI_name'];
$FTGGI_resphone = $_POST['GI_resphone'];
$FTGGI_email = $_POST['GI_email'];
$FTGGI_busphone = $_POST['GI_busphone'];
for($i=2;$i<166;$i++){
$FTGName[$i] = $_POST["item_$i"] * $_POST["Weight_$i"];
$FTGtotal += $FTGName[$i];
}
$to = "me@gmail.com";
$subject = "Estimation Request";
$body = "Customer Name : $FTGGI_name\n"
. "Customer Residence Phone: $FTGGI_resphone\n"
. "Customer Email: $FTGGI_email\n"
. "Customer Business Phone: $FTGGI_busphone\n"
for($i=2;$i<166;$i++){
.. "$_POST["name_$i"] . " : " . $FTGName[$i] . "\n" ";
}
. "Total is $FTGtotal\n";

?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация