Question
Why is PHP echoing post with string count?
For some reason when I use the POST method for a from lets says the value to name is Bob. When it echos the $_POST['name']
is says string(3) “Bob” rather then just printing Bob. Even if I do a var dump it still shows up the same way.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Can you share your code here.
My code for the form is
The only other code is my doctype and body and stuff like that but nothing in the head.
Here is the savePage.php
That’s it because I was having other problems so I tested it doing the simplest thing and my code come out like this:
string(4) “Test”