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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:42:42+00:00 2026-05-29T09:42:42+00:00

I have several questions involving the interaction between JavaScript and MySQL. The basic idea

  • 0

I have several questions involving the interaction between JavaScript and MySQL.

The basic idea of what I am trying to accomplish is to use JavaScript to allow admins to change the content of certain elements. These elements contain text and by clicking on the element, using JavaScript, a “pop-up” textarea with the old text should appear and allow the admin to modify the text. After the admin modifies the text he can then post it modifying data in the MySQL table.

I understand that the basic flow of this action will be:
javascript -> AJAX request -> script running on the server (PHP, Perl, ASP.NET, whatever) -> database

  1. Can some one give me a very basic demo of how to perform something like this?
  2. Is this unsafe?
  3. Is this the best approach for what I am trying to accomplish?
  • 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-29T09:42:43+00:00Added an answer on May 29, 2026 at 9:42 am

    This is pretty common way to provide users with a quick way to edit something.
    You are on right track. Use a popup to display the form, send an AJAX request to call a server script when user submits the form.

    For example, if you are using jqueryUI, this becomes pretty easy:

    • Refer http://jqueryui.com/demos/dialog/#modal-form to see how you can create popup forms using jqueryUI
    • Once a user submits the form, you need to POST it to a server script that receives the data and updates the database (as you’d normally do). Make it send a SUCCESS/FAIL value so that the client can know if the operation succeeded.
    • Dismiss the popup if the update was successful or display the error if it was not.

    Is this unsafe?

    This isn’t unsafe. The only thing to remember is that you need to check that the user is authenticated (i.e. in session) in the server script(which updates the records) that is called via ajax . Forgetting that will make anyone call your server script to edit records. This is pretty obvious but I’ve seen so many people miss this when it comes to AJAX requests. If the operation you are doing doesn’t require authentication then obviously this isn’t a problem.

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

Sidebar

Related Questions

The basic idea is to have several questions, but only 1 showing randomly on
I have several questions: 1. What's the difference between isoMDS and cmdscale? 2. May
Need to use own imaged markers instead built-in pins. I have several questions. 1.
There have been several questions over the past few days about the proper use
I have several questions about best use of exceptions in Java. Consider the code
I have several thread synchronization questions involving a simple .NET C# design. I have
I have several questions regarding filenames and the iPod Library. I understand I can
I have several questions concerning the controls like a button, if You could answer
I thought about migrating subversion a lot and I have several questions still open.
There have been several questions already posted with specific questions about dependency injection ,

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.