PHP - problems with simple form not displaying correctly

Axem

New Member
Ok - I have this code.\[code\] $formBlock = "<form method=\"post\" action=\"$_SERVER[PHP_SELF]\"> <p>First Name: <input name=\"first\" type=\"text\" size=13 maxlength=25 /></p> <p>Last name: <input name=\"last\" type=\"text\" size=13 maxlength=25 /></p> <p>City:<input name=\"city\" type=\"text\" size=25 maxlength=50 /></p> <p>State: '.state_selection().' </p> <p>Email:<input name=\"email\" type=\"text\" size=50 maxlength=75 /></p> <p>Birthday:<input name=\"bday\" type=\"text\" size=10 maxlength=10 />(ex 1982-06-26)</p> <p><input type=\"hidden\" name=\"op\" value=http://stackoverflow.com/"ds\" /></p> <p><input type=\"submit\" name=\"submit\" value=http://stackoverflow.com/"Add Contact\" /></p> </form>";\[/code\]However - the '.state_selection().' part just comes up with the text '.state_selection().'If I change the string to single quotes, and then remove the \ before the internal double quotes...everything displays correctly - but when I try to submit the form it tells me that it can't find the $_SERVER[PHP_SELF] url.
 
Back
Top