Query String question from Novice to Ninja book

On page 119, last paragraph, of the PHP & MySQL Novice to Ninja Edition 5, Kevin explained that if you use a question mark in the action=“?” of the form tag, it will not show in the URL. I use Kevin’s archive code and it display the querystring?

I am using PHP version 5.3 on www.ipage.com

Does anyone know why it still show the querystring in the URL?


Which version of the code are you using? What browser are you using? What is your URL before and after submitting the form?

I am not sure I follow what you mean by what version of the code I am using? I am using PHP 5.3

I am using FF.

before submitting: http://www.website.com/addjoke/?addjoke

after submitting: http://www.website.com/addjoke/

Then… it did exactly what it said it would do. There’s no query string on your “after submitting” URL.

Oh, I thought it would not have any querystring at all, since we are using a $_POST instead of $_GET.

Thanks for the reply, i guess I will just research more on it.

It… doesnt have a querystring. A querystring is defined as a ? followed by one or more variables and their values (if any) on the end of a URL.

“before submitting” it has a query string, containing one variable, “addjoke”, which has no value associated to it.
“after submitting” it doesnt.

OK, make sense now. :smile:

Thanks for the help and have a great evening!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.