PDA

View Full Version : HELP-- wml + php


hmvrulz
02-14-2007, 07:50 AM
i am new to wml coding... can some one plz verify the following code for me...

i want the user to input the following fields... and when he submits the forum... i want the add.php to get the various data thru POST method to be added to the database...

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
<card title="Sign Guest Book">
<p>Name:
<input type="text" emptyok="true" maxlength="25" name="gb_name" value="">
<br />
Place:
<input type="text" emptyok="true" maxlength="30" name="gb_place" value="">
<br />
Phone No:
<input type="text" maxlength="50" name="gb_phone" value="">
<br />
E-Mail:
<input type="text" maxlength="50" name="gb_email" value="">
<br />
Message:
<input type="text" emptyok="true" maxlength="500" name="gb_mess" value="">
<br />
</p>

<anchor>
<go method="post" href="add.php">
<postfield name="gb_name" value="$(gb_name)"/>
<postfield name="gb_place" value="$(gb_place)"/>
<postfield name="gb_phone" value="$(gb_phone)"/>
<postfield name="gb_mess" value="$(gb_mess)"/>
</go>
Submit
</anchor>


</card>
</wml>



am getting the following error...from wapsilon emulator...
http://www.wapsilon.com/sourceview.cgi?http://www.gnuer.com/hmv/wap/entry.wml
Parser failed. Invalid XML syntax.
"Mismatched tag"
Line 22
Column 2
Byte 579
This error occurs when a tag is opened, but another tag is closed first (like <a><b></a></b>).

kehers
02-14-2007, 08:44 AM
AFAIK the problem isnt that of php. it is due to your wml syntaxTry closing your <input> tags i.e

<input type="text" emptyok="true" maxlength="25" name="gb_name" value="">

should be

<input type="text" emptyok="true" maxlength="25" name="gb_name" value="" />

and lets see what happens.

hmvrulz
02-14-2007, 12:29 PM
thanx mate... i had over seen tht....