PDA

View Full Version : Should I be concerned???


h8ids
07-11-2007, 04:44 PM
Built a dynamic site whose buttons are generating a strange URL.
There's a lot going on in the site; so I'll give a brief run down of events and an example of the resulting URL.

I can live with a weird URL unless it poses a security problem.


The site pulls data from a database and dynamically calculates the number of records and pages needed to display five records at a time.

Normal URL: localhost/searchbool_all_2.php?page=2


On the results page, I have a button link to return to the search page. The return URL is strange to me.

Strange URL: localhost/searcher_2.php?


I don't understand why the "?" is appearing at the end. I've checked the code for the button link, nothing is wrong. The button code doesn't call any dynamic query nor does it share an ID or NAME with the dynamic search elements.


... standard page code here ...
<form action="searcher_2.php">

... more standard page code here ...

<!-- Return to search page -->
<input type="submit" value="New Search">

</form>
... standard page code here ...

Pennimus
07-11-2007, 06:22 PM
That's the default behaviour of a form - it adds a q mark for the GET variables that a form would send (GET being the default form method) but since there is no data sent there are no variables.

Nothing to worry about. If you want to get rid of it, either a) don't use a form to link back to the search page or b) send the data with a POST method.

h8ids
07-11-2007, 08:03 PM
thank you.