$username Posted April 6, 2008 Share Posted April 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/99885-solved-adding-more-then-one-var-to-equal-1-var-fix/ Share on other sites More sharing options...
trq Posted April 6, 2008 Share Posted April 6, 2008 $EventAll = $_POST['EventEmail'] . $_POST['EventSubject'] . $_POST['EventMsg']; Link to comment https://forums.phpfreaks.com/topic/99885-solved-adding-more-then-one-var-to-equal-1-var-fix/#findComment-510805 Share on other sites More sharing options...
$username Posted April 6, 2008 Author Share Posted April 6, 2008 Thanks, Works great!!! Brett Link to comment https://forums.phpfreaks.com/topic/99885-solved-adding-more-then-one-var-to-equal-1-var-fix/#findComment-510809 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.