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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:53:28+00:00 2026-05-25T23:53:28+00:00

I have a form that is submitted to a php script with jquery and

  • 0

I have a form that is submitted to a php script with jquery and ajax, but turning out blank in the php script.

form:

<table id="coachapplication">

<form id="coachapplicationform" action="" method="post">

<tr><td>Briefly explain your teaching methods:<br /> <textarea maxlength="100" name="coachmethods" id="coachmethods"></textarea></td></tr>

<tr><td><input type="checkbox" value="yes" name="agree" id="agree" /> I am fully prepared to take on the responsibilities of being a coach which include logging into the website daily and hosting sessions.

<tr><td><button id="submitcoachapplication" type="button">Submit</button></td></tr>

</form>

</table>

jquery script:

$('#submitcoachapplication').click(function() {

$.ajax({

type: "POST",

url: "includes/sendcoachapplication.php",

data: $("form#coachapplicationform").serialize(),

success: function(msg){

    $("#coachapplication").html(msg);

}

});

});

php script:

<?php

session_start();

$user = $_SESSION['username'];

include("dbcon.php");

include("user.php");

$result = mysql_query("SELECT * FROM coachapplications ORDER BY username");

while($row = mysql_fetch_array($result)) {

$username = $row['username'];

if($username == $user) die("You already have a pending application.");

}

$coachmethods = $_POST['coachmethods'];

$coachmethods = mysql_real_escape_string($coachmethods);

$agree = $_POST['agree'];

if($coachmethods == "") die("Please enter some info about how you intend to teach.");

if($agree != "yes") die(" Please agree to the terms.");

$sql="INSERT INTO coachapplications (username, methods) VALUES ('$user', '$coachmethods')";

if (!mysql_query($sql,$con)) die('Error: ' . mysql_error());

echo 'Your application has been submitted, and is awaiting admin approval. If you are found suitable for the program, you will be taught how to use the system.';

mysql_close($con);

?>
  • 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-25T23:53:29+00:00Added an answer on May 25, 2026 at 11:53 pm

    A <form> element is not allowed as a child of <table>. Your browser is likely error correcting by moving it outside the table, which would mean that the <input> elements are no longer inside it.

    Put the <table> inside the <form>, not the other way around.

    Better yet, don’t use tables for layout.

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

Sidebar

Related Questions

I have a simple PHP mailer script that takes values from a form submitted
I have an Ajax form that updates a div when submitted with a submit
I have created a custom PHP script which uploads information submitted by a form
Edit: Originally I had a simple form Ajax script that wasn't working, turns out
I have a form that when submitted successfully generates new elements on the page
I have an ASP.NET MVC form that when submitted can return either an ActionResult
I have a form that searches all rows in a single table (TServices) that
I have a HTML form that is sometimes submitted with accented characters: à, è,
I have a PHP script that is using get_dns_record to retrieve and display specific
I have a simple one text input form that when submitted, needs to fetch

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.