Jump to content

Recommended Posts

okay here is what I am thinking

 

I have some code anything that when runs displays "hello world!!!"

 

So I want to create a link of a button that displays and removes the item in the same screen

 

I know this is not correct and it dosen't have to be a button it can be a simple link

I am carrying an ID value that i must preserve on the Self.PHP post...

 

I know I am wrong but I am loooking for clues..

 

here are my toughts:

 

 

print '<h4><form action = "self.php" method="post">$on=TRUE<p>';

if($on== FALSE and $off == TRUE){  <---- Current stage when oppening page
code = TRUE:
if(code == TRUE){
  run code
}

}
print '<br><input type="submit" name="submit" size"20" value="on"/><br /></h4>';

then have another button that says the oposite

print '<h4><form action = "self.php" method="post">$on=false<p>';

if($on== TRUE and $off == FALSE){
  code = TRUE:
if(code == TRUE){
  run code
}

}
print '<br><input type="submit" name="submit" size"20" value="off"/><br /></h4>';

Link to comment
https://forums.phpfreaks.com/topic/36671-displaying-code-on-comand-onoff/
Share on other sites

that work FYI I figure it out... is there a better way let me know

 

		

   echo "<br><a href=\"tourney_admin.php?tourney_id=$tourney_id&switch=on\">Turn on </a>";

   echo "<br><a href=\"tourney_admin.php?tourney_id=$tourney_id&switch=off\">Turn on </a>";
				   echo "<br>$switch";
				   if($switch == on){	

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.