Jump to content

wolvesbane

New Members
  • Posts

    2
  • Joined

  • Last visited

wolvesbane's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey there, I've been trying to find the cause of the problem but couldn't. needed help from experts out there. the code supposed to echo it's submitted value on the same form when the checkbox is changed. here's the code: <!DOCTYPE html> <?php $office = $_POST["office"]; echo $office; ?> <html> <body> <?php if (isset($office)) { echo "ON<br>"; } else { echo 'OFF<br>'; } ?> <form name="checkbox" method="POST" action="interfaceButton.php" enctype="multipart/form-data"> <?php if(isset($office)){ echo "asdfaf"; echo "<input type='checkbox' name='office' value='on' checked onclick='this.form.submit();'";> } else{ echo '<input type="checkbox" name="office" value="" onClick="submit();"';} ?> </form> </body> </html> Was going to make use this concept and replace the input like a switch button for an web automation project. but im stuck here. output given when code was tried was: "; } else { echo 'OFF '; } ?> } else{ echo '<input type="checkbox" data-cke-saved-name="office" name="office" value="" ';}="" ?="">
  2. Hey there, I've been trying to find the cause of the problem but couldn't. needed help from experts out there. the code supposed to echo it's submitted value on the same form when the checkbox is changed. here's the code: <!DOCTYPE html> <?php $office = $_POST["office"]; echo $office; ?> <html> <body> <?php if (isset($office)) { echo "ON<br>"; } else { echo 'OFF<br>'; } ?> <form name="checkbox" method="POST" action="interfaceButton.php" enctype="multipart/form-data"> <?php if(isset($office)){ echo "asdfaf"; echo "<input type='checkbox' name='office' value='on' checked onclick='this.form.submit();'";> } else{ echo '<input type="checkbox" name="office" value="" onClick="submit();"';} ?> </form> </body> </html> Was going to make use this concept and replace the input like a switch button for an web automation project. but im stuck here.
×
×
  • 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.