Solved

Web Form - PHP, AJAX, MySQL, and JSON?

Posted on 2010-11-18
2
676 Views
Last Modified: 2012-05-10
I am having trouble getting my head wrapped around the initial stages of project I am doing for on intranet page.

What I Have:
A database of customers hosted on the local network with Ubuntu/MySQL.

What I Need:
A web form that loads a customer record from the mysql database in order to present an interface that makes editing the database easy.  The AJAX would serve the purpose of form field validation, though its primary purpose would be to verify certain fields are unique to their respective field across the entire database.

What I Am Requesting
A sample solution.  A php web page that connects to a mysql database and loads a recordset/customer record.  As the form is filled out, certain fields will be checked for basic validity (not empty/null, follows email address format, follows phone number format, etc...), a couple of other fields will be checked against the database to ensure the value is unique (e.g. a customer's username).  If it is not unique, return an alert back to the client letting them know that another user is currently using that username and to please select assign a different/unique username.  I also would like to be able to trigger alerts based off of database field values if a sample of how this would be accomplished could be provided.  I have been looking at using jquery, but I have not been able to wrap my head around everything yet.

Sample Dbase Fields:
Name,  Client Type, Email Address, Phone Number, Username, Password, Credit Status

When the form loads initially, display an alert if credit status is set to hold, otherwise wait for input.
When entering a new customer (vs. editing an existing one) indicate name field is not valid until it is no longer empty.
When email address field is edited check for conformity to email address spec.
When phone number is edited, check for conformity to email address spec
When username is input, make sure the username is unique (no other customers have the same username)

Once I get the concept of how to make the fields interact, I will add all the other fields of the dbase and customize other alerts/dialog boxes etc..  I also plan to put the jquery datepicker in since some of the other fields contain dates, but I think I should be able to get that once I see how the to make the form post back with AJAX.  

Please ask any questions...
0
Comment
Question by:SaintRonin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:SaintRonin
ID: 34166176
I think I more need someone to explain this is what we are doing and why.  I realize that to access mysql info, we need to use php to establish a database connection and pull a recordset with which to work.  The confusion comes in on the form and how it works and what all is required and the work flow of how it processes data.  Thanks for the help...
0
 
LVL 10

Accepted Solution

by:
TRW-Consulting earned 500 total points
ID: 34170531
This topic could run into days of coding and a multitude of back and forth questions and answers.  I doubt if anyone would spend as much time as is needed to complete this (me included).  But I will point you to a free product that you can use to do this, and it has it's own forum for resolving any questions you would have. Most likely any question would have already been answered in the forum.

The product is MySqlAjaxTableEditor --> http://www.mysqlajaxtableeditor.com/

The forum for this is at --> http://www.mysqlajaxtableeditor.com/discussmate/
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
php hashing methods 3 50
AJAx/JQuery/JSON Error 3 39
Update Set Column Query Not Working as Expected 6 46
Load string Array from file 23 42
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question