I know this is not the right forum but i can't get answers elsewhere. My problem is similar to the above except that it involves wml. I created the code below, but I get errors (unexpected end to wml source).Does anyone know what to do?
repdetails.wml
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "
http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card2" title="userdetails">
<p>
User Details:<br/>
Enter User ID<br/>
<input name="repid"/><br/>
Enter Name<br/>
<input name="name"/><br/>
Enter address<br/>
<input name="address"/><br/>
Enter Telephone Number<br/>
<input name="tel"/><br/>
<anchor>
<go method="get" href="insert.php">
<postfield name="customer_id" value="$(repid)"/>
<postfield name="name" value="$(name)"/>
<postfield name="address" value="$(address)"/>
<postfield name="tel" value="$(tel)"/>
</go>
Submit Data
</anchor>
</p>
</card>
</wml>
insert.php
<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"
http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card id="card2" title="add">
<p>
<?php
//connect to database server
$connection = mysql_connect("localhost", "root", "password")
or die ("connection failed");
//Select the database
$db = mysql_select_db("db_wap", $connection)
or die ("failed to select database <br />\n");
//execute a query
$sql = mysql_query("INSERT INTO 'tbl_User' ('repid', 'name', 'address', 'tel') Values ('$_GET[repid]', '$_GET[name]', '$_GET[address]', '$_GET[tel]')") or die("Input failed");
if (!$sql) {
echo "Error cannot Insert record.!!!<BR>"; mysql_error;exit;
}else {
echo "record inserted";
}
//insert OK inform user
print "<b>Customer Database:</b> <br/>";
?>
</p>
</card>
</wml>