Есть система радиокнопок. Идея такова: выбираешь один из пунктов и жмешь селектор "Купить", после чего тебя направляет по ссылке. Для каждой выбранной радиокнопки своя ссылка. Все работает кроме главного - направления по ссылке. Методом проб, ошибок и вопросов на форумах выяснилось что не написан php для данной системы. Пожалуйста, помогите написать или подскажите как это делается. Данные:
Вот такая форма:
<form method="POST" action="/index.php">
Вот такие кнопки:
<div style="margin-left:0px;"><input type="radio" name="i5" value="1" class="styled" /></p></div>
<div style="margin-left:0px;"><input type="radio" name="i5" value="2" class="styled" /></p></div>
<div style="margin-left:0px;"><input type="radio" name="i5" value="3" class="styled" /></p></div>
<div style="margin-left:0px;"><input type="radio" name="i5" value="4" class="styled" /></p></div>
<div style="margin-left:0px;"><input type="radio" name="i5" value="5" class="styled" /></p></div>
<div style="margin-left:0px;"><input type="radio" name="i5" value="6" class="styled" /></p></div>
Вот такие ссылки (к примеру):
/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=88&category_id=18&option=com_virtuemart&Itemid=94Вот такой полный HTML:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<!-- Шапку хэд уберать нельзя, иначе не подключится библиотека со скриптом. -->
<!-- Если все таки joomla редактор не позволит этого сделать (оставить хэд) - подключим файл отдельной страницей -->
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://www.rgadget.ru/iphone4s/qq-i_checklib.js"></script>
<link rel="stylesheet" href="http://www.rgadget.ru/iphone4s/gparams.css" media="screen" />
<style type="text/css">
body {
padding: 20px;
}
p {
font: 1em/1.7em arial,sans-serif;
}
.third {
width: 30%;
float: left;
}
.clear {
clear: both;
}
.code {
font: 1.2em/1.7em monospace;
}
</style>
</head>
<body>
<form method="POST" action="/index.php"><!-- куда направить данные -->
<div width="100%"><!-- вся страница (секция под обе колонки) -->
<table align="left" width="30%" height="100%"><!-- Левая таблица -->
<tr>
<td style="text-align: center;" colspan="4" valign="left">
<p><span style="font-size: 24pt; font-family: georgia, palatino;">Белый </span></p>
<p> </p>
</td>
</tr>
<tr>
<td style="text-align: center; width: 130px;"><span style="font-size: 17px;"><span style="color: #020202; font-family: georgia, palatino; font-size: 15px; line-height: normal; text-align: center;">24 490р.</span></span></td>
<td style="text-align: center; width: 130px;"><span style="font-size: 12pt; line-height: normal; text-align: center; color: #020202; font-family: georgia, palatino;">27 490 р.</span><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; line-height: normal; text-align: center;"> </span> </td>
<td style="text-align: center; width: 130px;"><span style="font-size: 17px;"><span style="color: #020202; font-family: georgia, palatino; font-size: 15px; line-height: normal; text-align: center;">30 490р.</span></span></td>
</tr>
<tr><!-- первая строка -->
<td><!-- первая колонка -->
<p>
<!-- код маус овера -->
<img src="/iphone4s/first.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second.png'; height='150';"
onmouseout="this.src='/iphone4s/first.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<!-- код радио -->
<div style="margin-left:0px;"><input type="radio" name="i5" value="1" class="styled" /></p></div>
</td>
<td>
<p><img src="/iphone4s/first2.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second2.png'; height='150';"
onmouseout="this.src='/iphone4s/first2.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<div style="margin-left:0px;"><input type="radio" name="i5" value="2" class="styled" /></p></div>
</td>
<td>
<p><img src="/iphone4s/first3.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second3.png'; height='150';"
onmouseout="this.src='/iphone4s/first3.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<div style="margin-left:0px;"><input type="radio" name="i5" value="3" class="styled" /></p></div>
</td>
</tr>
</table><!--/////////////// конец первой колонки -->
<table align="right" width="30%" height="100%"><!-- начало второй колонки (таблицы всмысле) -->
<tr>
<td style="text-align: center;" colspan="4" valign="right">
<p><span style="font-size: 24pt; font-family: georgia, palatino;">Черный </span></p>
<p> </p>
</td>
</tr>
<tr>
<td style="text-align: center; width: 130px;"><span style="font-size: 17px;"><span style="color: #020202; font-family: georgia, palatino; font-size: 15px; line-height: normal; text-align: center;">24 490 р.</span></span></td>
<td style="text-align: center; width: 130px;"><span style="font-size: 17px;"><span style="color: #020202; font-family: georgia, palatino; font-size: 15px; line-height: normal; text-align: center;">27 490 р.</span></span></td>
<td style="text-align: center; width: 130px;"><span style="font-size: 17px;"><span style="color: #020202; font-size: 12pt; line-height: normal; text-align: center; font-family: georgia, palatino;">30 490р</span><span style="color: #020202; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px; line-height: normal; text-align: center;">.</span></span></td>
<td style="text-align: center; width: 50px;"></td>
<td style="text-align: center; width: 50px;"></td>
</tr>
<tr>
<td>
<p><img src="/iphone4s/first.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second4.png'; height='150';"
onmouseout="this.src='/iphone4s/first.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<div style="margin-left:0px;"><input type="radio" name="i5" value="4" class="styled" /></p></div>
</td>
<td>
<p><img src="/iphone4s/first2.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second5.png'; height='150';"
onmouseout="this.src='/iphone4s/first2.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<div style="margin-left:0px;"><input type="radio" name="i5" value="5" class="styled" /></p></div>
</td>
<td>
<p><img src="/iphone4s/first3.png" border="0" width="130" height="78"
onmouseover="this.src='/iphone4s/second6.png'; height='150';"
onmouseout="this.src='/iphone4s/first3.png'; height='78'; width='130'"
style="float: left; border-image: initial; border: 0px initial initial;"/>
<div style="margin-left:0px;"><input type="radio" name="i5" value="6" class="styled"/></p></div>
</td>
</tr>
</table>
</div>
<div align="center"><p class="clear" style="padding: 20px 0 50px;"><input type="submit" value="Купить" style="width: 200px;"/></p></div><!-- кнопка купить -->
</form>
<!-- made in gexerio -->
</body>
</html>
Замечание модератора:
Эта тема была закрыта автоматически ввиду отсутствия активности в ней на протяжении 100+ дней.
Если Вы считаете ее актуальной и хотите оставить сообщение, то воспользуйтесь кнопкой
или обратитесь к любому из модераторов.
|