This topic is locked

How to add query strings to this script

4/11/2021 9:18:05 AM
PHPRunner General questions
L
Lance Spurgeon author

This script in the blog article "messages" is perfect but how can I ammend it to incorporate a querystring

$page = preg_replace('/(\/|\.php)/i', '', substr($_SERVER["PHP_SELF"],
strripos($_SERVER["PHP_SELF"],"/")) );
$sym_pos = strripos($page,"_");
$selectData["pageName"] = $sym_pos?substr($page,0,$sym_pos):$page;
$selectData["pageType"] = $sym_pos?substr($page,$sym_pos+1):"";
$selectData["project"] = 1;
$record = DB::Select("messages", $selectData )->fetchAssoc();
$_SESSION["messages"] = "";
if( $record ) $_SESSION["messages"] = $record["value"];
admin 4/12/2021

It is impossible to tell what article you referring to or what is your objective. Please elaborate.

L
Lance Spurgeon author 4/13/2021

hey Sergey the blog artile was has a linllink sorry it didn't show https://xlinesoft.com/blog/2020/06/16/context-help-in-your-web-applications/

admin 4/13/2021

Thank you, makes sense. But what is your objective?

L
Lance Spurgeon author 4/14/2021

I have a single table that carries all the dynamic lookup lists like regions, sub regions, territories and industries etc. This is managable by the user in the application so that they can customise their application to their individual needs. What I want to do is use this script not just for helpful hint but also to present the page title and multiple tooltips. However typicically is restricted to one list page type i.e.: list page, what I want to achieve and have kindof done is seperated each of these sections into a seperate custom menu so that user will only see the list of regions they can update etc. So i want to use the querystring to provide a more meaningful discription instead of System Setting have System Settings - Region. See the blow screenshot

img alt