Chris,

  Not sure what your problem is, I couldn't determine as I read your email.  
Your code looks fine, I recently upgrade mysql to 4.1.7 and php couldn't open 
the database.  I guess this is a bug, but not sure if it a php or mysql bug.

 Anyway, check the mysql forum page at www.mysql.com under the install cat., I 
have posted this issue and there is allot of respond back.  

ed
-----Original Message-----
From: Chris Hewitt [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 30, 2004 3:25
To: PHP Install List
Subject: Re: [PHP-INSTALL] Inserting data into mySQL...?


On Wed, 2004-12-29 at 16:59, Oscar J. Ramos wrote:
> mySQL version 4.1
> 
> php 5
> 
> OS Windows 2003 server
> 
> IIS
> 
> Running php as cgi
> 
>  
> 
> Php.ini file configurations
> 
>  
> 
> Extension_dir = EURoec:/php/ext/EUR
> 
> Extension=php_mysql.dll
> 
>  
> 
> PHP code used.
> 
>  
> 
> ?>
> 
> @ $db = mysql_connect("localhost", "username", "password");
> 
>  
> 
>  
> 
> if (!$db)
> 
> {
> 
>  
> 
>    echo "<center>Error:  Could not connect to database.  Please try
> again later.</center>";
> 
>    exit;
> 
>  
> 
> }
> 
> $id = '';
> 
> $name = 'Oscar J. Ramos';
> 
> echo 'Test 1 ' . $name . '<br>';
> 
> mysql_select_db("dbtest");
> 
>  
> 
> $query = "insert into tbltest values
> 
>           ('".$id."', '".$name."')";
> 
>           
> 
> $result = mysql_query($query);
> 
>  
> 
> echo $name;
> 
>  
> 
> ?>
> 
>  
> 
> added path c:\php
> 
>  
> 
> Oscar J. Ramos
> 
> Technology Support Technician
> 
>  
> 
> By Design LLC.
> 
>  
> 
> (212) 500 - 4466
> 
> x4466
> 
> [EMAIL PROTECTED]
> 
> www.bydesignllc.com

I may not be able to help as I do not use PHP under MS Windows, but you
have not told us what problem you are having.If you use code that will
show the error messages then post them here, we may be able to help.

Regards

Chris

Reply via email to