473,810 Members | 2,948 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date from form to mySQL

How do I take a field from a form and store it on in a mySQL table?

TIA, Lee
Aug 10 '05 #1
4 1781
*** Lee David wrote/escribió (Wed, 10 Aug 2005 16:18:49 -0500):
How do I take a field from a form and store it on in a mySQL table?


Do you want an explanation of *all* the process or you have a very specific
question? There're many things involved as to explain it all: HTML, forms,
database management and design, data validation in PHP, database access...

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Aug 11 '05 #2
> How do I take a field from a form and store it on in a mySQL table?

Do you know how to do ANYTHING with mySQL in PHP?
Do you know how to send form fields to a PHP script?

Let us know what you can do in PHP.

I don't like offering complete code because I end up doing all the work, and
you learn nothing.

Aug 11 '05 #3
Lee David wrote:
How do I take a field from a form and store it on in a mySQL table?

TIA, Lee


Hi Lee,

As others have mentioned, this is too broad a question for a good
answer from the group.

Here's a rough outline of what you need to study to work out your own
answer:
HTML-- <form>, <input>, possibly other form fields
Javascript-- client-side validation techniques
PHP-- $_GET() and $_POST(), server-side validation, data
transformation
PHP-- the mysql_whatever( ) functions (or possibly the PEAR module)
MySQL-- database definitions, INSERT queries

I think that's a comprehensive, eagle's view of the terrain. I'm sure
if I missed something really big, someone will jump in and mention it.

If you use this outline, you will probably have questions that are more
specific which the group would be able to respond to.

Aug 11 '05 #4
In article <14************ *************** **@40tude.net>, Alvaro G Vicario wrote:
*** Lee David wrote/escribió (Wed, 10 Aug 2005 16:18:49 -0500):
How do I take a field from a form and store it on in a mySQL table?


Do you want an explanation of *all* the process or you have a very specific
question? There're many things involved as to explain it all: HTML, forms,
database management and design, data validation in PHP, database access...


the data from your form will arrive in (among other places) an array called
$_REQUEST you take it from there and create the mysql commands to store it
in your table.

--

Bye.
Jasen
Aug 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3344
by: Jeroen | last post by:
Hi, I'm searching but not finding :( I need the code that creates automatic the days in a month So like for this month, it creates the days in this format 01-Oct, 02-Oct, .... This should be used in a form so when opening the page, automatic all the
2
3214
by: Paul Beckett | last post by:
I have successfully used strtotime to format the date on a webpage that is pulled form a MySQL database in the form yyyy-mm-dd. However, in another part of the webpage, I have to insert another date that may contain a NULL entry in the database. If I use strtotime to format this then it enters the current date, whereas I want it left blank. Can anyone help? Paul Beckett
5
3738
by: Dominique Javet | last post by:
Hello, I'm new to php and mysql and I use Dreamweaver MX 2004, so sorry for this "newbie" question... I've found no answer in the forum ... I've a date problem with my formular. In my mysql DB my filed "date" in table "experience" is like this: Y-m-d (2002-07-23). My fied`date` is date, NOT NULL with no default entry My form read well the date data depending the id, (pe. 30.02.2003), but when I submit a new date, I receive as result...
8
2191
by: nimish | last post by:
I have Month, Day and Year fields on my form. When I submit this form I want to create a valid date from all three fields before inserting into MYSQL table. I tried following: $dob=$Month."-".$Day."-".$Year; $dob = strtotime($dob); But it does not update my date field in the table. I am novice in PHP, do you know where i am making a mistake.
1
532
by: Jason | last post by:
I have a form which ads a technician service ticket into mysql. The fields are tech name time spent service client name etc... I assumed that mysql was storing the date of each record added to the
1
2130
by: DD | last post by:
I have a mainform with a subform. The main form as a dropdown box "chooseDate", in the afterupdate event i requery the subform so all records with the same date are viewed. Now i only want to print the selected records of the selected month Can any one advise on the code to add to the print button i have tried this StrLinkCriteria = ".forms! = " & Me! this does not work
2
2955
by: Kun | last post by:
I have an html form that takes dates and inserts them into a mysql file. Currently, users have to type in dates in the yyyy-mm-dd format. As of now, this process works with the sql. However, I would like to make this process easier by: 1) providing drop down menus for year, month, and date respectively. in a failed attempt, i tried made 3 drop down lists (dateyear, datemonth, dateday) respectively and then used string interpolation...
3
3444
by: dave | last post by:
I need to compute an expiration date based on the number of hours, days, or months purchased. The expiration date needs to be expressed in minutes something like '1260481600'. How can I get the current date and time expressed in minutes? Once I have this number I can add the number of minutes purchased to the current date/time to get the expiration date.
6
3984
by: ruraldev | last post by:
I have been trying my best to display a chosen date as dd-mm-yyyy but insert it into the mysql database as yyyy-mm-dd, I know it must be simple but no matter what I try I can't get it to work. At the moment the date is displayed as dd-MM-yyyy but of course this won't add to the mysql database, if I change the display to yyyy-MM-dd then it displays in that format (which I don't want) but will add to the database OK. I had thought that I...
3
3547
by: janetopps | last post by:
I have a news website, with asp pages, which was on Access, and i upgraded to MySQL, i used Bullzip to transfer the data. It had about 1000 pages, which im now able to pull up on the public side. Im sorting out a few glitches though. Since i upgraded from ms access database to MySQL, i have added about 4 articles to test the new setup. I note some fields aren't being added in the new mySql database for the new 4 records. When i ran the MySQK...
0
9722
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.