Sponsored Content
Top Forums Web Development How to create a link that will display the contents of a PHP variable? Post 303012807 by Corona688 on Friday 9th of February 2018 10:25:32 AM
Old 02-09-2018
Ah, suddenly I see what you want.

Well, you can get different values from the same webpage by putting different parameters into it, i.e.
Code:
http://site/path/to/webpage.php

,
Code:
http://site/path/to/webpage.php?variable1=value1

, etc. Put special links like
Code:
<a href="?variable1=value1">something</a>

and that should refer to the same page with a parameter.

These values will appear in the superglobal array $_GET.

Code:
<?php

if(!array_key_exists("mode", $_GET)) {
  print("<!-- Default values -->");
  print("<a href="?mode=first">Something Else</a>\n");
  exit();
}

switch($_GET['mode']) {
case "first":
        printf("First Mode Data\n");
        break;
default:
        printf("Unknown Mode\n");
        break;
}
?>

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to display contents of folder when 'cd' is used

Hi, I am a new learner of Unix. I am currently working on a Solaris 8 machine. Earlier, when I use 'cd <folder name>' command, I am not only able to change the folder but also able to see the contents of the folder as if a 'ls -lt' command was executed. However, since a week, suddenly this... (3 Replies)
Discussion started by: mumashankar
3 Replies

2. UNIX for Dummies Questions & Answers

Display the contents of an array

Hi i have just registered So i am at university studying forensic computing and we have to learn c++ i have never done anything with c++ before and i am abit stuck i need to create a programme to display the contents of an array of characters forwards and in reverse Can anyone help me... (1 Reply)
Discussion started by: RossMc
1 Replies

3. Web Development

Display the contents of a table.

Dear Friends, Am an newbie to this domain. I have a table which is filled with contents which i need to be updated with,so am trying to design a flow which would read the data from the table and mail it to me at regular intervals. I could make out the flow using mailx command but want to... (3 Replies)
Discussion started by: gokulj
3 Replies

4. UNIX for Dummies Questions & Answers

What are the contents of a symbolic link?

Hiii... I wanna know "What are the contents of a symbolic link?"....... From google I dint get a good answer....that's why I posts here...... Thanking you. Krishna (1 Reply)
Discussion started by: krishnampkkm
1 Replies

5. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

6. Shell Programming and Scripting

Display array contents on a new line

ksh eg arrayname=(1 2 3 4 5) I'm trying to display the individual contents of an array on a new line without using a loop, using one line of code. output 1 2 3 4 5 (3 Replies)
Discussion started by: squrcles
3 Replies

7. UNIX for Advanced & Expert Users

Cannot create a link with the same name

Hi - Our system admin cannot create a link to NAS with one particular name but he can create with other names. What might be the cause? Regards ---------- Post updated at 11:30 AM ---------- Previous update was at 11:29 AM ---------- It says permission denied. (2 Replies)
Discussion started by: w020637
2 Replies

8. UNIX for Dummies Questions & Answers

HTML: Display contents of file using Variable

<tr><td bgcolor=#D7EBAD><b>Instructions :</b></td> <td>`cat temp.txt`</td></tr> Hi Experts, I have an requirement of displaying file contents in HTML mail , for which am using the above approach, Where as the output is kind of not as expected. If there are 5 lines in the file, in the... (4 Replies)
Discussion started by: scott_cog
4 Replies

9. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies
HOBBITWEB(5)							File Formats Manual						      HOBBITWEB(5)

NAME
Xymon web page headers, footers and forms. DESCRIPTION
The Xymon webpages are somewhat customizable, by modifying the header- and footer-templates found in the ~xymon/server/web/ directory. There are usually two or more files for a webpage: A template_header file which is the header for this webpage, and a template_footer file which is the footer. Webpages where entry forms are used have a template_form file which is the data-entry form. With the exception of the bulletin files, the header files are inserted into the HTML code at the very beginning and the footer files are inserted at the bottom. The following templates are available: bulletin A bulletin_header and bulletin_footer is not shipped with Xymon, but if they exist then the content of these files will be inserted in all HTML documents generated by Xymon. The "bulletin_header" contents will appear after the normal header for the webpage, and the "bulletin_footer" will appear just before the normal footer for the webpage. These files can be used to post important informa- tion about the Xymon system, e.g. to notify users of current operational or monitoring problems. acknowledge Header, footer and form template for the Xymon acknowledge alert webpage generated by bb-ack.cgi(1) bb Header and footer for the Xymon Main view webpages, generated by bbgen(1) bb2 Header and footer for the Xymon All non-green view webpage, generated by bbgen(1) bbnk Header and footer for the now deprecated BBNK webpage, generated by bbgen. You should use the newer hobbit-nkview.cgi(1) utility instead, which uses the hobbitnk templates. bbrep Header and footer for the Xymon Main view availability report webpages, generated by bbgen(1) when running in availability report mode. bbsnap Header and footer for the Xymon Main view snapshot webpages, generated by bbgen(1) when running in snapshot report mode. bbsnap2 Header and footer for the Xymon All non-green view snapshot webpage, generated by bbgen(1) when running in snapshot report mode. columndoc Header and footer for the Xymon Column documentation webpages, generated by the bb-csvinfo.cgi(1) utility in the default Xymon con- figuration. confreport Header and footer for the Xymon Configuration report webpage, generated by the hobbit-confreport.cgi(1) utility. Note that there are also "confreport_front" and "confreport_back" templates, these are inserted into the generated report before the hostlist, and before the column documentation, respectively. event Header, footer and form for the Xymon Eventlog report, generated by hobbit-eventlog.cgi(1) findhost Header, footer and form for the Xymon Find host webpage, generated by bb-findhost.cgi(1) graphs Header and footer for the Xymon Graph details webpages, generated by hobbitgraph.cgi(1) hist Header and footer for the Xymon History webpage, generated by bb-hist.cgi(1) histlog Header and footer for the Xymon Historical status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a historical (non-current) status log. hobbitnk Header and footer for the Xymon Critical Systems view webpage, generated by hobbit-nkview.cgi(1) hostsvc Header and footer for the Xymon Status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a current status log. info Header and footer for the Xymon Info column webpage, generated by hobbitsvc.cgi(1) utility when used to show the host configuration page. maintact Header and footer for the Xymon webpage, generated by hobbit-enadis.cgi(1) utility when using the Enable/Disable "preview" mode. maint Header, footer and form for the Xymon Enable/disable webpage, generated by hobbit-enadis.cgi(1) nkack Form show on the status-log webpage when viewed from the "Critical Systems" overview. This form is used to acknowledge a critical status by the operators monitoring the Critical Systems view. nkedit Header, footer and form for the Critical Systems Editor, the hobbit-nkedit.cgi(1) utility. replog Header and footer for the Xymon Report status-log webpage, generated by hobbitsvc.cgi(1) utility when used to show a status log for an availability report. report Header, footer and forms for selecting a pre-generated Availability Report. Handled by the bb-datepage.cgi(1) utility. snapshot Header and footer for the Xymon Snapshot report selection webpage, generated by bb-snapshot.cgi(1) SEE ALSO
bbgen(1), hobbitsvc.cgi(1), xymon(7) Xymon Version 4.2.3: 4 Feb 2009 HOBBITWEB(5)
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy