Parse error: syntax error, unexpected T_IF in /home/content/d/a/v/html/goal_forms/goalnext.php on line 17
Here is goalnext.php
Code: Select all
<?php
include("../member_pages/session.php");
include("../dbconnection/dbconnection.php");
session_start();
//test to make sure none of the fields are empty
$goalis=$_POST[goalis];
$goaltimeframe=$_POST[goaltimeframe];
$goalfeel=$_POST[goalfeel];
$goalsmell=$_POST[goalsmell];
$goalsound=$_POST[goalsound];
$goalpeople=$_POST[goalpeople];
$goalaccomplishedwhen=$_POST[goalaccomplishedwhen];
$userid=$_SESSION['userid']
//check to make sure all boxes are filled out.
if($goalis && $goaltimeframe && $goalfeel && $goalsmell && $goalsound && $goalpeople && $goalaccomplishedwhen){
//insert data into database
$sql="INSERT INTO goal SET userid=$userid, goalis='$goalis', goaltimeframe='$goaltimeframe', goalfeel='$goalfeel', goalsmell='$goalsmell', goalsound='$goalsound', goalpeople='$goalpeople', goalaccomplishedwhen='$goalaccomplishedwhen'";
$result=mysql_query($sql);
if($result){
header("/stepform.php");
}else{
echo "Cannot currently enter your information.";
}
}else{
echo "You must complete the entire form in order to submit this page. Please click the Back button make sure everything is filled out and try again.";
}
?>here is some code from the form that is being sent to the php
Code: Select all
<form name="goal" method="post" action="/goal_forms/goalnext.php">Code: Select all
<fieldset>
<legend>My goal is to:</legend>
<textarea name="goalis" cols="90" rows="4" wrap="virtual"></textarea>
</fieldset>