Insert into table from array
<pre><code>$valor = $_POST['valor'];

$post_vars = array('iphone3g1', 'iphone3g2', 'nome', 'iphone41', 'postal', 'apelido');
foreach($post_vars as $var) {
    $$var = "'" . mysql_real_escape_string($_POST[$var]). "', ";
}

$sql = "INSERT INTO clientes (iphone3g1, iphone3g2, nome, iphone41, postal, apelido, valor) VALUES ($$var '$valor')";
$query= mysql_query($sql);
</code></pre>

<p>Thank You so much for your previous answers guys.</p>

<p>I manares do write down this bit of code, i think it males scense but os not working.</p>

<p>I hope You can help me.</p>

<p>Thank You!!!</p>
