Form value, php echo problem

I have analysed every bit of code from my form and i dont understand why when i submit the form the value for my ‘email’ and ‘event’ fields are not storing the submitted data…

<?php
if(isset($_POST[‘submit’])){

$dbc= mysqli_connect('localhost','user_alien','alien123','mookle');
$email=mysqli_real_escape_string($dbc,trim($_POST['email']));
$event=mysqli_real_escape_string($dbc,trim($_POST['eventname']));
$datefrom=mysqli_real_escape_string($dbc,trim($_POST['datefrom']));
$dateto= mysqli_real_escape_string($dbc,trim($_POST['dateto']));
$description=mysqli_real_escape_string($dbc,trim($_POST['ret']));
$website=mysqli_real_escape_string($dbc,trim($_POST['website']));
$industry=$_POST['industry'];

//check required fields//
$error=array();
if(empty($email)){$error[]='Please enter your email address';}
if(empty($description)){$error[]='Please enter your description!';}
if(empty($event)){$error[]='Please enter your event name!';}
	if(count($error)==0){
			
			//connect to database//
			$dbc= mysqli_connect('localhost','user_alien','alien123','mookle')
			or die('mysql error has occured');
			$query="INSERT INTO mookle_events VALUES('$email','$event','$datefrom','$dateto','$description','$website','$industry')";
			$result=mysqli_query($dbc,$query)
			or die('try again, mysql error occurered');
            if($result){
			echo ('your event is now in our system!');}
			else{'result aint working';}

			}
	else {
	echo implode('&lt;br /&gt;',$error);}

}

?>

<table width=“950” height=“54” border=“0” align=“center” cellpadding=“0” cellspacing=“0” ba bgcolor=“#3300CC”>
<tr>
<td> </td>
</tr>
</table>

&lt;form method="post" action="newevent.php"/&gt;
&lt;span class="style2"&gt;
&lt;label for="email"&gt;Your Email&lt;/label&gt;
&lt;input type="text" name="email" id="email" class="BigText" value="&lt;?php echo $email; ?&gt;"/&gt;
&lt;/span&gt;
&lt;p class="style2"&gt;
&lt;label for="eventname"&gt;Event Name&lt;/label&gt;
&lt;input type="text" name="eventname" id="eventname" class= "BigText" value="&lt;?php echo $event;?&gt;"/&gt;
&lt;/p&gt;&lt;p class="style2"&gt;
&lt;label for="date"&gt;Date: From&lt;/label&gt;
&lt;input type="text" id="datefrom" name="datefrom" class="BigText"/&gt;To:
&lt;input type="text" id="dateto" name="dateto" class="BigText"/&gt;
&lt;/p&gt;
&lt;label for="eventdes" class="style2"&gt;Event &lt;br /&gt;
Description&lt;/label&gt;
&lt;p&gt;
&lt;textarea name="ret" cols="54" rows="10"/&gt;&lt;?php echo $description;?&gt;&lt;/textarea&gt;
&lt;/p&gt;&lt;p class="style2"&gt;
&lt;label for="website"&gt;Event Website&lt;/label&gt;
&lt;input type="text" id="website" name="website" class="BigText" /&gt;
&lt;/p&gt;
&lt;p class="style2"&gt;
&lt;label for="industry"&gt;Industry&lt;/label&gt;
&lt;input type="text" name="industry" id="industry" class="BigText"/&gt;
&lt;/p&gt;
&lt;input type="submit" value="New Event" name="submit" id="submit"/&gt;
&lt;/form&gt;&lt;/p&gt;

As pointed out, you only need to connect to the DB once, so you can remove the second call to mysqli_connect.

Pretty sure the problem is because you’re not specifying which columns to insert the data into. If the values you are not inserting are not in order, you need to tell the DB whereabouts they go:

"INSERT INTO mookle_events
(`column1`, `column2`, `column3`, etc..)
VALUES
('$email','$event','$datefrom','$dateto','$description','$website','$industry')";

Don’t know if it’s the forum or your code,
But in the mysql insert the $industry variable has a space inside it

Are any errors shown?
The form itself looks fine as far as I can see (providing you’ve declared the $email,$event and $description prior to the conditional statement)

Personally (though some may disagree) may I suggest dropping the use of mysqli_real_escape_string? For maybe htmlentities
Or at the very least remove the 2nd mysqli_connect, while I’m not familiar with procedural mysqli, I’m quite sure it being declared twice is overkill

I checked the query and it seems to be ok.

INSERT INTO mookle_events VALUES(‘test@gmail.com’,‘test’,‘test’,‘test’,‘test’,‘test’,‘test’)

I haven’t looked into the code, but try to echo $query to check the query. Another thing, aren’t you connecting to the database twice?