Problem passing strings with PHP post

Posted by andy on Stack Overflow See other posts from Stack Overflow or by andy
Published on 2010-05-05T12:32:10Z Indexed on 2010/05/05 12:38 UTC
Read the original article Hit count: 350

Filed under:
|
|

Hi Guys,

Basically I'm developing a (very) simple search engine. You can enter a search term and you are taken to the results page - which works fine. However on the results page, I have a button that will take you to the next 10 results: where $term is the $_POST['term'] value.

echo "<input type='hidden' name='term' value='" . $term . "'>";

This causes the following problem with the term is for example "aidan's".

When the next 10 button is clicked, the term becomes aidan\ and no further results are found.

I am not doing anything to $term.

I usually use Java, but am required to use PHP for this uni assignment!

Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about php

Related posts about post