![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #2 | ||
| "Metnetsky" <mimetnet@syr.edu> wrote in message news > On Tue, 08 Jul 2003 17:49:42 +0100, James wrote: > > > What is the best way to add a new record to a MYSQL DB using a FORM and > > PHP ? > > Any examples or URLS ? > > > > Thanks > > If you can make use of the PEAR (pear.php.net) library you should give it > a shot as it's a great interface to databases. But here's a simple > example using pure PHP commands. > > > if (!$myConn = mysql_connect("localhost")) { > exit("Unable to make a connection to the database"); > } mysql_connect can work just as well with $connectionid=mysql_connect($host,$user,$pass) or die ("Could not connect"); as the 'or die' statement exits the program after the string is sent to the browser.. just another way of doing things. That, and it looks neater. | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: adding, mysql, php, record, using |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Random Record | Disco | PHP | 0 | 07-01-2007 3:11 PM |
| Is it possible to update a record if it does not exist? | Jeff Silverman | Database | 1 | 06-10-2007 12:21 AM |
| Updating record remotely from a script? | Burma Jones | Database | 1 | 05-31-2007 8:48 PM |
| MySQL Query Cache Not Working: MySQL 5 / Windows XP | Good Man | Database | 0 | 05-31-2007 8:46 PM |
| Well crap. There goes my perfect record. | Lee | General Ebay Questions And Answers | 49 | 05-30-2007 1:01 AM |
| Featured Websites | ||||
|