# PHP to MySQL

**URL:** <https://forum.kirupa.com/t/php-to-mysql/225280>\
**Category:** programming\
**Created:** [May 10, 2007, 11:28am UTC](https://forum.kirupa.com/t/php-to-mysql/225280 "2007-05-10T11:28:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![magjac](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@magjac](https://forum.kirupa.com/u/magjac)\
**Post date:** [May 10, 2007, 11:28am UTC](https://forum.kirupa.com/t/php-to-mysql/225280/1 "2007-05-10T11:28:41Z")

</div>

I cant get this script to post to mysql, any ideas?

```auto
<?php

// change the following values with your own MYSQL server access data
$host = "xxxxxxxx";
$user = "xxxxxxxx";
$pwd = "xxxxxxxx";
$db = "xxxxxxxx";

$connection = mysql_connect($host, $user, $pwd) or die("&error1=".mysql_error());
mysql_select_db($db, $connection);

$Fname = $_POST['Fname'];
$Enamn = $_POST['Ename'];
$adress = $_POST['adress'];
$ort = $_POST['ort'];
$email = $_POST['email'];
$telefon = $_POST['telefon'];
$EAN = $_POST['EAN'];
mysql_query("INSERT INTO apris (`Fname`,`Ename`,`adress`,`email`,`ort`,`email`,`telefon`,`EAN`) VALUES ('$Fname','$Ename','$adress','$ort','$email','$telefon','$EAN')");
echo "ok"
 
?>

```
