PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 11th, 2000, 04:23 AM
shantanuo shantanuo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: Mumbai, India
Posts: 276 shantanuo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 53 m 31 sec
Reputation Power: 13
I have a form. When the user add an entry, it should get added in the Mysql table.
How is it done.
Again, I have a databse of 600 records typed in excel can I use it as my MySql database so that I don't have to type it again.

Here is part of the form.

<FORM ACTION='email.php3' METHOD='POST'>

Your ID:<BR>
<INPUT TYPE='text' NAME='CatID' SIZE='20' MAXLENGTH='30'>
<P>
Your name <BR>
<INPUT TYPE='text' NAME='CatName' SIZE='20' MAXLENGTH='30'>


------------------
Thanks
Shantanu
Learn HTML and Java at
http://www.oksoft.com

Reply With Quote
  #2  
Old June 11th, 2000, 05:52 AM
scoobydoo scoobydoo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Location: Sydney, Australia
Posts: 32 scoobydoo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13

// Split the variables into their individual variables..
while (list($name, $value) = each($HTTP_POST_VARS));

// connect into the database..
$db = mysql_connect ("localhost","username", "password");
mysql_select_db("database",$db);

// Inserting the values into tablename..
$sql_insert = "INSERT INTO tablename ( catID, catName ) VALUES ( '$catID', '$catName' )";

mysql_query($sql_insert);

good luck with the rest
scoobydoo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > How to connect a form to MySql

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap