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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello all:
I'm trying to use $SERVER[PHP_SELF] in my action parameter in my HTML form tag. And it works when I just type it out as an HTML form. But I'm trying to echo the form code in a php function to be called in an if statement in the body area. Here's a snippet of what I have so far...
Now when I access the page in my explorer it shows the form, but when I submit it throws up an ie error page. If anyone can help me out I would so greatly appreciate it. Thanks
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Right now your form is open for XSS attacks... Instead of using $_SERVER['PHP_SELF'] as target for your form you can also use '#' as target, which leads to exactly the same result (post to the same url) with that difference that it's impossible to inject malicious data into your html.