473,549 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can i get rid of a button after usage

57 New Member
I wanted to make a "show comments" button to show comments which the codes are in comment1.php.

but after it's clicked, the comments come out, but the "show comments" is still there. Maybe there's a way i could get rid of it or change it to hide comments.

I've tried this:

Expand|Select|Wrap|Line Numbers
  1. <form action="<?php $_PHP_SELF ?>" method="POST">
  2. <input name="show" type="submit" value="Show comments" />
  3. </form>
  4.  
  5. <?
  6.  
  7. if ($_SERVER['QUERY_STRING'] == 'show=Show+comments') {
  8. include ('comment1.php');
  9. }
  10.  
  11. ?>
  12.  
Feb 14 '16 #1
2 1257
Dormilich
8,658 Recognized Expert Moderator Expert
make a condition so that the button is only shown when the comments are not.

in the given case it would suffice to put the button (and its form) in the else clause of the condition.

PS. $_SERVER['QUERY_STRING'] == 'show=Show+comm ents'
=> $_GET['show'] === 'Show comments'
Feb 15 '16 #2
Toxicous8
57 New Member
Yeah, i didn't actually think about that. I'll try it thanks.
Feb 18 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
11103
by: Matthias Kwiedor | last post by:
Hi@all! I have a app (c#) where i load up a external dll (managed code from c#) with a small arraylist and hashtable in two routines (about 40000 objects in each arraylist and hashtable). If i load the dll everything is fine and when i load then the objects into an Hashtable or Arraylist of the main program it freezes 5MB each which i...
7
2306
by: Marco Martin | last post by:
Hi Group, I've been working on an application that reads data from a comm port and 1) writes the data to file, 2) displays this data in three different graphs in real time.The port is receiving data at 38400 baud, the plan is that it will go up to 115k baud. My app works fine on my development pc (P4 2.6G), But when the application runs on...
4
6456
by: RH | last post by:
Hi, I am building a windows application that has a feature that retrieves a set of records when a button is clicked. When the records are being retrieved I experience a complete system degradation, including other programs that become unresponsive. Here's what I found while the retrieval process is running: Using the Windows Task...
5
6723
by: Grant Mills | last post by:
Is there anyway to reduce the amount of memory a VB.net program allocates? Just a simple windows form, with one button and a label, and all the button does is change the text in the label (it's even hardcoded) and the EXE is using 15000+k of memory according to the task manager... I mean I realize that VB is going to be more bloated...
1
2580
by: Tim T. | last post by:
I'm currently working on a report to forecast production for finished goods. The user can select one or more items to forecast. In addition, they may select one or more warehouses to view breakdowns for as well as one or more customers. Now, the report iterates through the selected items in the finished good listbox. For each item that it...
8
8526
by: Adrian | last post by:
Hi I have a JS program that runs localy (under IE6 only) on a PC but it has a memory leak (probably the known MS one!) What applications are there that I could use to look at the memory usage of each object within my JS app to help locate my problem? Thanks
1
4834
by: Damien | last post by:
Hi guys, I'm looking for ideas for troubleshooting the following. We've tried some random things to try to treat the symptoms, but none seem robust enough to use when we go live, and we'd rather discover the root cause: We've got an ASP.NET application, running on framework 1.1 on Windows 2003 (IIS 6). Under default settings, during...
16
10910
by: dfaber | last post by:
Hi all, I have been searching for a keyboard and mouse tracker on linux. I've read solutions (watch at sourceforge) which look at /proc/interrupts to check keyboard or mouse activity. I also read one post where "watch" seems to have difficulty tracking usb keyboards and mice. So, I'm out of ideas here. My goal are: 1. Check keyboard...
9
4172
by: deerchao | last post by:
I'm developing a WinForms application. It slowly eats up memory, one client reported that it took 200MB or more, and finnaly crashed. I myself noticed it's common to use up 30MB memory, but if I minimize it (all the Forms will Hide, only a NotifyIcon is shown at the System Notification Area), the memory usage comes down to 8MB immediately....
1
8015
by: ShadowLocke | last post by:
This is an HTML application that allows you to monitor the CPU Usage (as seen in task manager) for any one task either on the local computer or a remote computer using vbscript. It then alerts you when that process has gone idle. I put it together this morning because I was tired of starting a program on remote computer, and continuously reconnect...
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7720
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7957
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1941
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.