带有php [html]的html表单

This is xhtml page:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile     

1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title> Order </title>
</head>

<body>
<p>Chose car: 
<form method="GET" action="aa.php"
<select name="sastojci[]">
<option name="sastojci[]" value="ma">Mazda sp 25</option>
<option name="sastojci[]" value="op">Opel Karl</option>
<option name="sastojci[]" value="me">Mercedes Cla</option>
<option name="sastojci[]" value="da">Dacia Sandero</option>
<option selected="selected" name="sastojci[]" value="ja">Jaguar XJ</option>
<option name="sastojci[]" value="pe">Peugeot 308</option>
</select>
<br/>
How many cars you want: 
<input type="text" name="kolicina" maxlength="3" value="3"/> .<br />
</p>
<p>
<input type="submit" name="submit" value="Submit"/>
</form>
</p>

</body>
</html>

This is part of php file:

<?php echo $_GET["sastojci[]"]; 
 echo $_GET["narudzba"]; ?>

When you press submit button blank page appears. Something wrong with xhtml file but do not know what. What should i change?

</div>
查看全部
duanpo7282
duanpo7282
2016/01/25 17:19
  • php
  • xhtml
  • 点赞
  • 收藏
  • 回答
    私信

1个回复