If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Simple database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-04, 08:34
munazip munazip is offline
Registered User
 
Join Date: Jun 2004
Posts: 1
Simple database

I am trying to create a simple table so people can enter their details and submit on my site, please help me on a simple way to do it, i want to use mysql and am still new to it
Reply With Quote
  #2 (permalink)  
Old 06-22-04, 12:03
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
Check out this basic tutorial on php and mysql and inputting from a form

http://hotwired.lycos.com/webmonkey/...tutorial4.html
Reply With Quote
  #3 (permalink)  
Old 06-22-04, 12:07
Steve T. Steve T. is offline
Registered User
 
Join Date: Sep 2003
Location: So. Cal. USA
Posts: 142
Hi, munazip! I am new as well and am in the middle of my first project. MySQL is a database, but if you want website visitors to submit information to it, you will need to use a middleware scripting language like PHP to submit your data to the db. PHP is not the only option, but it is a popular one and the one I have chosen.

This is what I have found thus far, but I am still not done so have more to learn...

You, as a user, can interact with the db by issuing SQL commands from the commandline application but from the web, you can use PHP to generate/compose the SQL commands and store them as string variables and then send the string to MySQL using PHP mysql_... functions.

In your case, all you want is a form submission, so you would create a web form as usual and then put PHP scripting in your HTML with the PHP tags <? ... ?> to (1) connect to the mysql db, (2) compose the SQL query to insert your data, and (3) send the SQL command.

If you wanted to show a confirmation of the data just entered, you would perform steps 1-3 again on the confirmation page, but you could send an index ID variable as a POST or GET value and your SQL query would be more about reading data and loading data into PHP variables you could then show to users (e.g.

print ("Name you entered : " . $name);

I would suggest you search for an easy step-by-step tutorial... there are many out there. I find that PHP seems to be somewhat flexible so I notice programming style more than I thought I would. I'm developing my own style based on my old programming habits (e.g. most folks would omit the parentheses I have above but since I am learning, I included them to remind me what the function applies to and to remind me to put a ; at the end).

If you have no programming experience, you can probably muddle your way through it but it will be much more challenging. "Little" things like syntax and punctuation will stop the whole thing ( a missing ; or { or something out of sequence, etc.).

Good luck!
--ST
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On