Re: [PHP-INSTALL] Inserting data into mySQL...?

[email protected] (Chris Hewitt)
Newsgroups php.install
Message-ID <[email protected]>
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 = “c:/php/ext/”
> 
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.