|
|
|
| Форма
<html>
<head>
<title></title>
</head>
<body bgcolor='#ffff00'>
<?php
session_start();
while($_GET['num'.$num]!=0)
{
$_SESSION['arr'][]=$_GET['num'.$num];
}
?>
<form name="Zakaz" action="mail_act.php" method="get">
<table>
<tr>
<td>
ФИО
</td>
<td>
<input name="name" type="text" value="">
</td>
</tr>
<tr>
<td>
E--mail
</td>
<td>
<input name="mail" type="text" value="">
</td>
</tr>
<tr>
<td>
Телефон
</td>
<td>
<input name="p" type="text" value="">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Заказать">
</td>
</tr>
</table>
</form>
</body>
</html>
Скрипт
<?
session_start();
require "db.php";
$msg="Заказанные товары \n ==================== \n";
foreach($_SESSION['Tovar'] as $val)
{
$sql= mysql_query("select * from cat where id=$val;");
$foo= mysql_fetch_array ($sql);
$msg=$msg."Имя товара - ".$foo['name']."\nФирма - ".
$foo['firm']."\nАртикул - ".$foo['article']."\n ==================== \n";
}
$msg=$msg."Заказчик\n----------------\nФИО - ".$_GET['name']."\nE-mail - ".$_GET['mail']."\nТелефон - ".$_GET['p']."\n----------------\n";
include("./mail_class.php");
$mail = new Mail();
//$mail -> to = "topstylus@mail.ru";
$mail -> to = "CrazySoft@bk.ru";
$mail -> subject = "Заказ";
$mail -> msg =$msg;
$mail -> rigorous_email_check = 0;
if($mail->send()){
}else{
echo("error");
}
echo("<br>");
?>
<html>
<body bgcolor="#ffff00">
<?
echo("Ваш заказ отправлен и скоро будет обработан<br>");
unset($_SESSION["Tovar"]);
session_destroy();
?>
<br>
</body>
</html>
|
| |
|
|
|
|
|
|
|
для: CrazyAngel
(19.03.2006 в 14:17)
| | Передаеться только $_GET['name'], а
$_GET['mail'] и $_GET['p'] нет
почему | |
|
|
|