Jump to content

[SOLVED] Adding more then one var to equal 1 var Fix!!!


$username

Recommended Posts

Hello All,

    I am trying to get all these fields in a form to be one big var to be added to a database

Here is the key line.

 

$EventAll = ($_POST['EventEmail'.'EventSubject'.'EventMsg'']);

 

 

<?PHP
if (!isset($_POST['submit'])) {
echo "<form method=\"post\" action=\"\">
<table>
     <tr>
  	 <td><strong>Email Address:</strong></td>
	 <td><input type=\"text\" name=\"EventEmail\"></td>
</tr>
    <tr>
  	 <td><strong>Subject:</strong></td>
	 <td><input type=\"text\" name=\"EventSubject\"></td>
</tr>
  
 <tr>
  	 <td><strong>Message:</strong></td>
	 <td><input type=\"text\" name=\"EventMsg\"></td>
     </tr>";


echo "<input type=\"submit\" class=\"button\" name=\"submit\" value=\"Submit!\">
</form>";



} else {


// This is the line that I am struggling with 
$EventAll = ($_POST['EventEmail'.'EventSubject'.'EventMsg'']);
mysql_query("INSERT INTO `event` (EventAll) VALUES ('$EventAll')");

}
?>

 

Thank you for any help.

 

Brett

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.