My first mysqli insert attempt
error is: [09-Nov-2013 17:51:42] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/foode/public_html/adduser.php on line 9
form is
[php]
<h3>First Name:</h3>
<input type="text" name="post_firstname">
<h3>Last Name:</h3>
<input type="text" name="post_lastname">
<h3>Email Address:</h3>
<input type="text" name="post_email">
<h3>City:</h3>
<input type="text" name="post_city">
<h3>State:</h3>
<input type="text" name="post_state">
<h3>How Often Email Choice 1:</h3>
<input type="text" name="post_increment1">
<h3>Email Times Choice 2:</h3>
<input type="text" name="post_increment2">
<h3>Your Text Phone Number & Carrier (Sprint, At&T, etc):</h3>
<input type="text" name="post_smsadd">
<h3>Type Of Email:</h3>
<input type="text" name="post_type1">
<h3>Second Type Of Email:</h3>
<input type="text" name="post_type2">
<h3>Preferred Group:</h3>
<input type="text" name="post_group1">
<h3>Preferred Group 2:</h3>
<input type="text" name="post_group2">
<input type="submit">
[/php]
login is
[php]<?php
function login()
{
$con = mysqli_connect(“localhost”, “foode_pub”, “none99$”) or die(‘Could not connect to server’);
mysqli_select_db(“food_db1”, $con) or die(‘Could not connect to database’);
}
?>[/php]
adduser is
[php]<?php
include(“login.php”);
?>
New user added
\n"; else echo "Problem adding new product
\n"; ?>[/php]Thanks for any thoughts.