![]() |
oh ok lol... Change the forms method from 'POST' to 'GET'. Aslo change the action from 'page.php?do=search' to just 'page.php' and add a hidden input with the name 'do' that has the value set as 'search'.
|
ahh.. thank you so much !! I had used get method earlier but did not change action or added that hidden field. It does work now. You solved a big problem of mine.
alright.. one more thing, GET method adds all the fields in the URL. How do I remove some ? for ex. that long securitytoken value also appends now. I must use that but do not want to show that in URL. Thank You |
You do not need the security tokens in a 'get' form.
|
oh great.. everything works now !!
few more things plzz :- 1. How do I make URL parameters mandatory or say redirect to main page or give an error message. Say, I have a page with a form that works only like page.php?do=edit&uid=50. Now, I do not want it to be opened/viewed like page.php?do=edit as it shows a blank form. 2. I wanted to know, when is $db->close(); used ? |
Judging by your url, I have one comment about it. The url makes it seem as if your editing something on the page, I would go back to using the POST request or implement your own CRSF protection on the GET request if your page allows for editing of anything important. VB's CSRF does not cover get requests only post requests.
1. PHP Code:
|
yes I am already using POST method there for the above "edit form page" and have implemented the CSRF protection.
1. Great.. DONE ! 2. In my page, its like this:- PHP Code:
Thank You |
From what I understand you do not need to use that unless your accessing the database in your code. And all that function does is clean up and close the connection to the database.
If Im wrong someone may correct me. |
but I am accessing database in my code, lot of queries are there !
Also, please tell, is there a way to insert escape charaters in the database by NOT using $vbulletin->db->escape_string_like(htmlspecialchars_uni($variable )) in the query, as it makes it very long when there are many fields. Thanks |
All times are GMT. The time now is 11:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|