PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am having some trouble with processing a simple PHP web form. It needs to collect the data and send the email with the information within XML tags so that our system can grab it and put the details into our online booking system.
the error i get is:
Parse error: syntax error, unexpected T_DNUMBER in /home/totisme/public_html/test/form/aminew.php on line 70
I looked a little. The error is not on line 70 in the code you posted, but a number of lines earlier.
Oh, and apparently I won't need to eat my shoe.
Find line 70 and look around until you see something with odd coloring. Strings are red except for metacharacters (backslash + something), variables are blue, comments are gray.
If there is nothing in the highlighting to suggest the source of the error I will eat my shoe.
I'm gonna eat my shoe...I'm dying to know what is the problem.
Oh and BTW this XML and php is so cool.I'm glad I know how to do it now!!
So let me get this straight(my XML is weak)..
1-This xml document is mailed to a email address.
2-The document is first verified against the schema(.xsd)
3-A transformation is applied to the document so that it is nicely formatted
and saved somewhere
In the code I posted, look at lines 59-60. It should all be red (except the variable) to indicate a string but it is not: the strings have quotes right in the middle, breaking them.
You can replace the inner "s with 's instead (it'll work fine) or escape the quote by putting a backslash before it (\").
1-This xml document is mailed to a email address.
2-The document is first verified against the schema(.xsd)
3-A transformation is applied to the document so that it is nicely formatted
and saved somewhere