Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3782926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:09:06+00:00 2026-05-19T11:09:06+00:00

EDIT: What a TW*T. Sorry everyone for wasting your time. Just missed a Google

  • 0

EDIT: What a TW*T. Sorry everyone for wasting your time. Just missed a Google jQuery link on one F’in page. Whoops.

Hi, i have a div containing 3 forms. These should be the only thing on the screen on page load. When any of them are submitted, a graph gets shown below. What i’m trying to do is within the PHP IF statement is make the div disappear that contains the forms. Sound simple?

This is my code:

if($_GET['submit1']){
echo "<script type='text/javascript'>$('#options').css('display','none');</script>";

However, when i do submit one of the forms (therefore a $_GET has occurred) the div is still there??

EDIT:

If i try people answer on one line i get this:

Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$'

But if i put in people’s multiline answers, no error, but div still shows!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:09:07+00:00Added an answer on May 19, 2026 at 11:09 am

    Why do you want to hide the forms with JavaScript?

    Simply do it with PHP:

    <?php
        if(!isset($_GET['submit1'])) {
    ?>
            //<form> your form HTML here
    <?php
        } else {        
    ?>
            <p>Your submitted data: <?php print_r($_GET); ?></p>
    <?php
        }
    ?>
    

    So your forms are only shown if you have NOT submitted one of them. You might have to adjust the parameters if you have multiple forms, for example

    if(!isset($_GET['submit1']) && !isset($_GET['submit2'])) {
    

    Edit: If you want to keep your forms after submitting but only hide it, you could do it that way:

    <?php
        $formsVisible  = !isset($_GET['submit1']));
        $formsDisplay  = $formsVisible ? 'block' : 'none';
    ?>
    <form style="display:<?php echo $formsDisplay; ?>">
    <!-- ... --->
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

IMPORTANT EDIT: Sorry everyone, i made a big mistake in the structure. char *name;
EDIT Sorry I forgot the most important part here. Each key can have more
Edit: I fixed the problem by just starting from scratch. Sorry to waste y'alls
Sorry, this is my first time using this forum. Apparently people can edit my
Edit: Sorry guys, realised I have no idea when it comes to integrating Webservices
EDIT: Sorry about ellipsis that's not what I actually have. For declaring an array
Hi everyone I have a compatibility problem with a simple jquery plugin i've done
EDIT: Sorry, this turned out just to be my mistake in initializing in the
EDIT: It does work (sorry). Something in this script is causing it to stop
Sorry for bumpy topic name (feel free to edit if you find more fitting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.