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]
I've read (a lot) in the PHP manual and can't see why/how this occurs. I know that php variables can't contain spaces, if I read the manual correctly.
I have an .html file that passes form data (with spaces in the html form field), to a .php file that also has a form, but I can get only the first piece of data ("x") displayed in the php form.
Here's what I have:
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]
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]
When I put your test code into a php files it works fine. But when I run it from the html file it has problems. I'll look into the reason a little more but thought this might solve the issue for the moment. Unless you already know this and are just curious why it doesn't work the other way. I find I am curious about that myself.
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]
Thank you. Rewrite 1 works fine, rewrite 2 has the same problem I did. Thanks for the help; as you can tell I'm learning and only know enough to be dangerous.
After a bit of searching I found that you may have an issue with parsing php in an html file. The following link has a good discussion about proper configuration and overriding default settings for apache. If your running your web server on windows I'm not sure. I tried a number of the changes suggested and one of them worked. I can now get your original code to display properly at least.