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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:29:36+00:00 2026-06-12T01:29:36+00:00

I know this question have been asked before but none of the solution seem

  • 0

I know this question have been asked before but none of the solution seem to work for me.

I have got a form inside a jquery ui dialog box:

<!-- Dialog: Register new user-->
<div id="dialogForUser" title="Register new user">
    <form id="target" action="" method="post" style="HEIGHT: 100%">
  <div class="form_settings">
    <h3>Enter user details:</h3>

    <p><span>name</span>
      <input width=150px id ="edName" name="edName" value="<?php echo htmlentities($name); ?>" />
    </p>
    <p><span>surname</span>
      <input width=150px id ="edSurname" name="edSurname" value="<?php echo htmlentities($surname); ?>" />
    </p>
    <p><span>username</span>
      <input width=150px id ="edUsername" name="edUsername" value="<?php echo htmlentities($username); ?>" />
    </p>
    <p><span>password</span>
      <input width=150px id ="edPassword" name="edPassword" value="<?php echo htmlentities($password); ?>" />
    </p>
    <p><span>confirm password</span>
      <input width=150px name="edConfirmPassword" />
    </p>
    <p><span>security question 1</span>
      <input width=150px name="edSecurityQuestion1" />
    </p>
    <p><span>answer</span>
      <input width=150px name="edSecurityAnswer1" />
    </p>
    <p><span>security question 2</span>
      <input width=150px name="edSecurityQuestion21" />
    </p>
    <p><span>answer</span>
      <input width=150px name="edSecurityAnswer2" />
    </p>
    <p><span>security question 3</span>
      <input width=150px name="edSecurityQuestion3" />
    </p>
    <p><span>answer</span>
      <input width=150px name="edSecurityAnswer3" />
    </p>
    <p><span>company name</span>
      <input width=150px name="edCompanyName" value="<?php echo htmlentities($companyName); ?>" />
    </p>
    <p><span>address line 1</span>
      <input width=150px name="edAddress1" value="<?php echo htmlentities($address1); ?>" />
    </p>
    <p><span>address line 2</span>
      <input width=150px name="edAddress2" value="<?php echo htmlentities($address2); ?>" />
    </p>
    <p><span>address line 3</span>
      <input width=150px name="edAddress3" value="<?php echo htmlentities($address3); ?>" />
    </p>
    <p><span>city</span>
      <input width=150px name="edCity" value="<?php echo htmlentities($city); ?>" />
    </p>
    <p><span>county</span>
      <input width=150px name="edArea" value="<?php echo htmlentities($area); ?>" />
    </p>
    <p><span>post code</span>
      <input width=150px name="edPostalCode" value="<?php echo htmlentities($postalCode); ?>" />
    </p>
    <p><span>country</span>
      <input width=150px name="edCountry" value="<?php echo htmlentities($country); ?>" />
    </p>
    <p><span>telephone</span>
      <input width=150px name="edTelephone" value="<?php echo htmlentities($telephone); ?>" />
    </p>
    <p><span>fax</span>
      <input width=150px name="edFax" value="<?php echo htmlentities($fax); ?>" />
    </p>
    <p><span>e-mail</span>
      <input width=150px name="edEmail" value="<?php echo htmlentities($email); ?>" />
    </p>
    <p><span>website</span>
      <input width=150px name="edWebsite" value="<?php echo htmlentities($website); ?>" />
    </p>
  </div>
</form>

A simple form with few edits. Then I have some jquery code that calls a php file (Users_cntr.php) for processing when the user press the “register button”:

$( "#dialogForUser" ).dialog({
            autoOpen: false,
            show: "blind",
            hide: "explode",
            buttons:[
                                {text: "Register", click: function() { 
                                    $.ajax({url:Users_cntr.php ,success:function(result){$("button").html(result);}});
                                                                                                            }
                                },
                                {text: "Cancel", click: function() { $(this).dialog("close"); }},
                            ]
    });


    $( "#openerForUser" ).click(function() {
        var dialogWidth = $(this).attr('dialogWidth');
        var dialogHeight = $(this).attr('dialogHeight');

        $( "#dialogForUser" ).dialog( "option", "width", dialogWidth );
        $( "#dialogForUser" ).dialog( "option", "height", dialogHeight );
        $( "#dialogForUser" ).dialog( "open" );
        return false;
    });

As you can see the php file is called using a ajax call (I have to admit that I did not understand how it works!).

All the php does is to create a new user and insert it into the database. My problem is that I don’t know how to pass the values of the ui dialogs to the php file. I assume I need to do some posting and I tried using some of the code suggested in the past but with no results.

Have you tried to do something similar in your project? Can you help?

Thank you very much,

Dino

  • 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-06-12T01:29:37+00:00Added an answer on June 12, 2026 at 1:29 am

    You need to send the data you want to submit in your button handler:

    $.post('Users_cntr.php', $('#target').serialize(), function(result){
        $("button").html(result);
    });          
    

    This simply calls your php file on the server, but the second “optional” parameter is the data to send. In this case we’ve taken your form with the id target and told jQuery it needs to be serialized

    I changed your $.ajax method to $.post as it’s a shortcut for the same thing and wraps the data-type and type properties. You can read more here:
    jQuery Post

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

Sidebar

Related Questions

I know this question has been asked before but I seem to have a
I know variants of this question have been asked before (even by me), but
I know this question has been asked before, but none of the previous answers
I know this question has been asked before but the solutions did not work
Hi I know this question have been asked before but the answers there isn't
I know this question has been asked and answered before, but none of the
I know similar permutations of this question have been asked before, but the answers
I know this question has been asked before, but I have tried the given
I know this question has been asked multiple times before, but none of the
I know this question has been asked before but I have a design question

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.