the XML file which i am getting not formated or written by me, i got that file from other source, and now i am just want that insert given xml data into db, in which as you know that data between below <userinfo> tags inserted successfully
What values are you not getting?
to get the value of the second 'field' tag change item to (1)
ran on my machine: output =:
sql = INSERT INTO timestamp_table (learningpermit, applicantname, penid, email, phone,firststroke) VALUES ('LOO4', 'Kaifi', 'AJX-AAQ-JFN-5Z', 'firstname.lastname@example.org', '123456', '1352793331')
I accept that i am not getting about xml and you doing best to sort out, but why you are not make it easy for me as you know that i am playing first time with xml, even i have sent you my all code in the begining of post.
yours advice for item(o),(1) exactly right, even i have added some extra tages between <userinfo> example: <penid>AJX-AAQ</penid>, <penid>AJX-AAQ-JFN-5Z</penid> and changed its item value accordingly.
but in the <field> still no luck even i have changed item values, even i put <fields> under <userinfo>.... please advice for better solution
I think you'll find ddymacek first spotted it.
I can't see why your <field> value won't work. Try running the code I supplied to see if it echoes out the field data. Or alternatively, echo the SQL as ddymacek has done: