close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How do I pass parameters in URL string on Search Results page?

Thread began 8/25/2020 12:38 pm by lr_leal239405 | Last modified 8/25/2020 2:59 pm by Ray Borduin | 562 views | 6 replies |

lr_leal239405

How do I pass parameters in URL string on Search Results page?

How do I pass special parameters to my search results page. I have this search page that I'm passing parameters to successfully on the URL. But, when I press the Search button, I don't know how to pass the same url parameters to the results page.

from
https://www.mywebsite.com/admin/scr/cac_prod_search.php?contact_id=33211&quotenum=98291

to
https://www.mywebsite.com/admin/scr/cac_prod_search_results.php?prod_name=Combo&Search=Search

So, on the above I searched for the word 'Combo'. So how do I add the parameters for example

cac_prod_search_results.php?prod_name=Combo&Search=Search?contact_id=33211&quotenum=98291

I need them for what I'm trying to build. I know may be it can be passed thru session but I would like to see if I can get them thru the URL.

Thanks.

(I can attach the docs if you want to see them)

Sign in to reply to this post

Ray BorduinWebAssist

You can change the action on the search page from:

action="cac_prod_search_results.php"


to:

action="cac_prod_search_results.php?contact_id=<?php echo(isset($_GET["contact_id"])?$_GET["contact_id"]:""); ?>&quotenum=<?php echo(isset($_GET["quotenum"])?$_GET["quotenum"]:""); ?>"
Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

huh? I tried that before I contacted you and it didn't work. I'll try again then. Thanks.

Sign in to reply to this post

lr_leal239405

Ohh. No wonder. I changed the form method to 'Post' instead of 'Get' and it passed those parameters now. Not sure what else will be affected but for now, that's what it was. Thanks.

<form class="Basic_Default" id="Search_Basic_Default" name="Search_Basic_Default" method="post"

Sign in to reply to this post

lr_leal239405

oh. the results has the if isset get:

<?php
$searchWADAcac_prod_subcategory_leveltwo_NEW_WADbSearch1 = new WA_MySQLi_Search("WADAcac_prod_subcategory_leveltwo_NEW","");
if (isset($_GET["Search"]) || isset($_GET["Search_x"])) {
$searchWADAcac_prod_subcategory_leveltwo_NEW_WADbSearch1->clearSearch();
$searchWADAcac_prod_subcategory_leveltwo_NEW_WADbSearch1->setSearch(array("type"=>"Key", "comparison"=>"includes", "join"=>"AND", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("prod_name", "prod_name2", "part_no"), "s", "".(isset($_GET["prod_name"])?$_GET["prod_name"]:"") ."");
}
?>

So...it has to be GET method. But then it doesn't pass values.

Sign in to reply to this post

Ray BorduinWebAssist

If you want to use get for the form, then you can add them as hidden form elements instead like:

php:
<input type="hidden" name="contact_id" value="<?php echo(isset($_GET["contact_id"])?$_GET["contact_id"]:""); ?>">


That would cause them to be forwarded with the rest of the form.

Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Yup, that last one does it. Thank you.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...