Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Is it possible for html to write to database?
Old 05-03-2010, 02:22 AM Is it possible for html to write to database?
ampledp's Avatar
Novice Talker

Posts: 11
Location: Malaysia
Trades: 0
Hi,

I've seen people doing contact form that allow visitor to ask or made contact with site owner using a html form. My question is, how the information is capture at back end, after a visitor hit the enter key?

Do you store those info entered into a database like sql or text file?

Is it possible to store those info straight into a plain text file in a folder using only html.

My level in web design is at doing static page in html only (very basic stuff).
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ampledp is offline
Reply With Quote
View Public Profile Visit ampledp's homepage!
 
 
Register now for full access!
Old 05-03-2010, 04:05 AM Re: Is it possible for html to write to database?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
It's not possible via simple HTML.
You use a server side programing language, that is embedded into the HTML.

For example, with PHP, you put the code between
Quote:
<?php
and
Quote:
?>
When a user submit a form, the form is passed the the web server process on the server, along with all arguments of the form.
The web server sees that the target of the form contains this "coding" tags, and launch the PHP interpreters.

The PHP interpreters runs through the code, and execute the described actions with access to the form value.
PHP can generate HTML during that process, that will be included into the HTML sent back to the user that posted the form.

Once the PHP is finished, the web server takes the hand back, and send the HTML (both static and generated by the PHP engine) back to the browser.

For example, take this file (hello.php):
PHP Code:
Hello  
<?php
$user
=$_GET['user'];  //fetch the user given in the URL
if($user==''){
  
$user="world";
}
print 
$user;
?>
!
If you access it without any parameters, it will output
http://something.com/world.php
Quote:
Hello world!
If you add a "user" parameter, it will use that parameter to adapt the HTML output
http://something.com/world.php?user=wmt
Quote:
Hello wmt!
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-03-2010, 08:07 AM Re: Is it possible for html to write to database?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by mark_109 View Post
Hi,

I think with new advancement in web designing and computer languages, it will be possible soon.
Nope! HTML is a markup language and is destined to stay that way.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-03-2010, 08:34 AM Re: Is it possible for html to write to database?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
No Chris, the times are changing...

http://dev.w3.org/html5/webdatabase/
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 05-03-2010, 10:17 AM Re: Is it possible for html to write to database?
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by tripy View Post
No Chris, the times are changing...

http://dev.w3.org/html5/webdatabase/
I got the impression from the writeup that WebSQL would be a scripting language independent of HTML, similar to how javascript is not HTML. So while you might embed a websql script into your code, it is not HTML:
Code:
<script type="text/websql">
prepareDatabase(function(db) {
  // got database
  var span = document.getElementById('doc-count');
  showDocCount(db, span);
}, function (e) {
  // error getting database
  alert(e.message);
});
</script>
Also, there is one critical difference between websql and what the OP needs:
Quote:
This specification introduces a set of APIs to manipulate client-side databases using SQL.
From what I understand it would be useful for tracking non-essential data about particular users, but not suitable for gathering data from multiple users and making that data accessible in the backend system, such as is the case in a contact form.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 05-03-2010 at 10:30 AM..
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 05-03-2010, 07:26 PM Re: Is it possible for html to write to database?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I got the impression from the writeup that WebSQL would be a scripting language independent of HTML, similar to how javascript is not HTML. So while you might embed a websql script into your code, it is not HTML:
Exactly
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-03-2010, 09:42 PM Re: Is it possible for html to write to database?
Experienced Talker

Posts: 32
Name: Maxence Hamel
Trades: 0
Sure the form is HTML, but there is scripting behind capturing the infos. Usually, there is javascript for first level verifications and after PHP connection with Mysql or other database to store the infos.
Hope this helps a bit to clarify!
__________________

Please login or register to view this content. Registration is FREE
- Fastest LiteSpeed Hosting | 99.99% up-time | R1Soft Hourly Backups

Please login or register to view this content. Registration is FREE
ubservers is offline
Reply With Quote
View Public Profile Visit ubservers's homepage!
 
Old 05-04-2010, 01:47 AM Re: Is it possible for html to write to database?
ampledp's Avatar
Novice Talker

Posts: 11
Location: Malaysia
Trades: 0
I begin to get a clearer picture of the whole flow. Thank a bunch guys. I will need some time to digest all these.
ampledp is offline
Reply With Quote
View Public Profile Visit ampledp's homepage!
 
Old 05-04-2010, 12:04 PM Re: Is it possible for html to write to database?
Novice Talker

Posts: 13
Trades: 0
i didn't think HTML could directly write to a database you would have to use dynamic coding.
__________________

Please login or register to view this content. Registration is FREE
services ||
Please login or register to view this content. Registration is FREE
T-H-C is offline
Reply With Quote
View Public Profile
 
Old 05-10-2010, 12:11 PM Re: Is it possible for html to write to database?
Junior Talker

Posts: 4
Name: Daniel Porter
Trades: 0
As the speakers before said: HTML5 specs allow for more direct access you'd have to use some layer in between until that. I suggest you go for PHP, even if you have just basic HTML knowledge it's easy to achieve results in PHP.
direx is offline
Reply With Quote
View Public Profile
 
Old 05-12-2010, 12:48 AM Re: Is it possible for html to write to database?
Banned

Posts: 20
Name: jesila
Trades: 0
This article is written for those who have basic knowledge of database programming, HTML, CSS and JavaScript. It is the first article in a 13-part series that explains how to build database forms with HTML. There are a number of advantages to this approach, which I will enumerate in the article. Let's get started.In order to write a database program, you need:
  • a database engine e.g. Microsoft Access, MSSQL, MySQL, Oracle, etc
  • a database API to link the database and the programming language.
  • a programming language such as C++, Java, Visual Basic.net, and Perl.
  • Windows API e.g. win32 API to design the forms. Note that many people prefer to use studios instead. The use of studios makes the designing of the forms less tedious.
In writing any program, the Windows API gives you more flexibility than studios. That is, you can create more forms of your choice with Windows API than you would with a studio.
If you are looking for flexibility, and you do not want to go through the tedious process of using a Windows API, then know that you can use HTML. Authors of PL/SQL have already been using HTML to create their forms, but not in the way that I present in this series of articles.
Note that everybody today is expected to have a browser in his computer. The use of HTML to create database forms gives you design ease, and the library to produce the forms, which is the "browser," is readily available. So if you want flexibility and you do not want to use a Windows API, HTML is a good choice. I show you how to do that in this series.


__________________________________________________ __________________
jesila is offline
Reply With Quote
View Public Profile
 
Old 05-12-2010, 07:37 AM Re: Is it possible for html to write to database?
Banned

Posts: 242
Name: Vijay.Seo
Location: Delhi,India
Trades: 0
No this is not possible yet
seo.vijay is offline
Reply With Quote
View Public Profile Visit seo.vijay's homepage!
 
Reply     « Reply to Is it possible for html to write to database?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.70232 seconds with 12 queries