WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : How to Insert a Date Format Into MySQL from PHP
Categories : PHP, Databases, MySQL, Date Time, Beginner Guides Update Picture
Peter Saul
Date : Mar 30th 2002
Grade : 2 of 5 (graded 7 times)
Viewed : 43709
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Peter Saul
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

For a quick begginerrs note if you want to insert a date into a MySQL field that is of
DATE type, then do something like the following:

<?php
$date
= date("Y-m-d");
mysql_query("INSERT INTO date_table VALUES ('$name', '$date')", $db_connection);
?>



Cut your MySQL Connections to 1 line of code
Categories : PHP, Beginner Guides, Databases, MySQL
email new items in db
Categories : PHP, Email, Databases, MySQL, Beginner Guides
mysql date/time converters
Categories : PHP, MySQL, Databases, Date Time
Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time
Specify your connection settings and create a link to a MySQL database.
Categories : PHP, PHP Classes, Databases, MySQL, Beginner Guides
Convert a File database into MySQL
Categories : PHP, Filesystem, Databases, MySQL, Beginner Guides
mySQL/PHP/search with multientry form and table output with colored rows
Categories : PHP, Beginner Guides, MySQL, HTML and PHP, Databases
Phorum, MySQL, Language, UK date format, MySQL UK Date format
Categories : PHP, Date Time, Strings, MySQL, Databases
List people whose birthdays fall on the current Day and Month
Categories : Databases, Date Time, MySQL, PHP
Newbie Notes #4 - Trapping dumb MySQL query errors
Categories : PHP, Databases, MySQL, Debugging, Beginner Guides
Data Retrieve from Mysql using AJAX with PHP
Categories : PHP, AJAX, Date Time, Databases, MySQL
This program allows you to upload an ODBC ressource - i.e. an MS-Access database to a MySQL server.
Categories : Databases, MySQL, Complete Programs, PHP, Databases
Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields
Categories : MySQL, Date Time, PHP, Databases
Simple function to return the number of days in a time span between 2 given dates.
Categories : PHP, Date Time, MySQL, Databases
Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays.
Categories : Calendar, Date Time, PHP, Databases, MySQL
 Vamshidhar mt wrote : 835
Hai Saul Peter,

U R exampl is simple and easy to Use.

I need U R help I had some problem connecting to mysql and I am getting message something like this.....

Fatal error:  Call to undefined function:  mysql_connect() in /var/www/html/DataBase.php on line 9

If U can help me I would be very thank full to U,

Do I need to chance any of apache server configuration files if so pls mail me to this ID .

Bye
Vamshi
 
 dragomir laurentiu wrote : 837
...my php give me something like this :(..Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\phpWeb\date.php on line 3
...plz give me some idea about mySQL conf.
 
 majid hussain wrote : 864
This exaple print the system date, I want to print what I write into the text field

thanks
 
 zerin zainal wrote :882
Hai Saul Peter, 

I need ur help I had some problem connecting to mysql and I am getting message something like this..... 

Notice: Undefined variable: name in c:\inetpub\wwwroot\php\date.php on line 3

Notice: Undefined variable: db_connection in c:\inetpub\wwwroot\php\date.php on line 3

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\inetpub\wwwroot\php\date.php on line 3


/If U can help me I would be very thank full to U, 

Do I need to chance any of apache server configuration files if so pls mail me to this ID . 

Bye 
zerin