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 6910097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:46:16+00:00 2026-05-27T08:46:16+00:00

When the form is submit my jquery accordion stops working my file name is

  • 0

When the form is submit my jquery accordion stops working my file name is add.php here is its code

<?php require_once('database.php');?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title></title>
    <link rel="stylesheet" href="css/accordionTheme.css"> 
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/jquery.ui.core.js" type="text/javascript"></script>
    <script src="js/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="js/jquery.ui.accordion.js" type="text/javascript"></script>

    <script>
    $(function() {
        $("#myAccordion").accordion();
    });
    </script>
<head>
<body>
    <div id="myAccordion"><!-- Start Accordion --->
        <h2>
            <a href="#">Add Student</a>
        </h2>

        <div>
            <form action="add.php" id="form1" method="get" >//here my form start
                <p>Please add Student Data</p>
                <label for="stname">Enter Student Name:</label>
                <input name="stname" type="text" id="stname" size="37" />
                <br /><br />
                <label for="stclass">Enter Student Class :</label>
                <select name="stclass">
                <option>MPhil</option>
                <option>M.Sc.</option>
                </select>
                <br />
                <input name="Add" type="submit" id="Add" value="Add" />
            </form>
            <?php
            //lets start submit data to database
            if(isset($_GET['stname'])&& isset($_GET['stclass']))
            {
                $stname=$_GET['stname'];
                $stclass=$_GET['stclass'];

                if(mysql_query("insert into student(teacher_id,student_name,student_class) values ('1','$stname','$stclass')"));
                {
                    print "<p>record added</p";
                }
            }
            ?>
        </div>
        <h2>
            <a href="#">Add course</a>
        </h2>

        <div></div>

        <h2>
            <a href="#">Add publication</a>
        </h2>

        <div></div>
        </body>
    </html>

I am printing php inside body you can see recordadded when form is submitted.

  • 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-27T08:46:17+00:00Added an answer on May 27, 2026 at 8:46 am

    The p tag you print using PHP is not closed, which is what makes JavaScript go crazy. Close it and it should work OK.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to convert the onchange=this.form.submit() to jQuery format? <form action=process.php method=post> <select name=qty onchange=this.form.submit()>
I am newbie to jQuery, can someone explain what this code does: $(#currency form).submit(function(e)
I'm using jquery to submit my form (with id #myForm here) as follows: $(document).ready(function()
im using jquery to submit a php form. during the submission, it will validate
How can I submit jQuery form object (not ajax)? I try form.submit() and it
I'm trying to stop postback on form submit if my custom jQuery validation returns
I'm doing a jQuery AJAX post like this: var form = $(#formid); form.submit(function() {
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
When using jQuery to submit a form is it possible to place the resulting
When using jQuery 's ajax method to submit form data, what is the best

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.