• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need Help Passing a PHP URL Variable to a PHP Include URL Address.

TruePaige

Diamond Member
Hey guys. I have a search box that takes the user input as a variable.

It then uses GET to add it to the URL.

Then I have a script I reference with a PHP Include, and I need to add the variable to the end of the PHP Include URL. Here's the code..


Of course the way it posts the code is a bit hard to read, but the first part down to the php section is the search box.

The PHP is supposed to grab a script in my cgi-bin and attach the keyword variable

so something like ?keywords= keywords from the searchbox above.

edit: Code not posting right..hold on..
 
Heck, I got it! Posting the solution just for anyone who might need it.

$keywords=$_GET['keywords'];

Was needed first

Then I could just call it as $keywords in the query string.

Man I feel dumb. =)
 
Even though this topic is like 3 years old, and it's a very simple script. It helped me a lot! Thanks! 😀
 
Back
Top