I have this error
Parse error: syntax error, unexpected '<' in step2.php on line 119
the script is part of a purchased set, and all seems well. Their is no '<' on or near line 119. the file has been recreated from the purchased zip and so unedited.
can anyone point me at why. ( yes, im a newbie and ive looked at syntax, missed pairs of symbols, unmatched pairs etc. cant see any. have some C, VB, but all rusty. just getting into this.
oh, and it was fine first time - biggest challenge I had was getting the userid and password correct for the mysql db. - even coded around the password error I got - ( now reversed as I spotted the idiot mistake i made ).
😕
code is below, line 119 is just before the //CREATE PROJECT remark.
many thanks in advance.
fyi. host is hostgator, was trying this on a add on domain rather than base - but ftp and set it up on base got the same error at same point.
<?
require_once 'header.php';
$project_name = AparamVal(project_name);
$autoresponder_email = AparamVal(autoresponder_email);
$admin_email =AparamVal(admin_email);
$question1 = AparamVal(question1);
$question2 = AparamVal(question2);
$question3 = AparamVal(question3);
$question4 = AparamVal(question4);
$question5 = AparamVal(question5);
$account_id = 1;
$project_name0 = mysql_escape_string($project_name);
//Check If Project Name Already Exist
$sql = "SELECT project_id FROM project WHERE project_name = '$project_name0'";
$sql_execute = mysql_query($sql);
if(!$sql_execute)
{
echo "ERROR_PROJECT_NAME_CHECK :".mysql_error()."<br>";
exit();
}
$num_rows = mysql_num_rows($sql_execute);
//if($num_rows != 0)
//{
//echo "<br><br><font color=#FF0000><center>Project <b>$project_name</b> already exist. Please use a different name<br></font></center>";
//require_once 'step1.php';
//exit();
//}
$number_of_questions = 0;
unset($questions);
if($question1)
{
$questions .= $question1."|";
$number_of_questions++;
}
if($question2)
{
$questions .= $question2."|";
$number_of_questions++;
}
if($question3)
{
$questions .= $question3."|";
$number_of_questions++;
}
if($question4)
{
$questions .= $question4."|";
$number_of_questions++;
}
if($question5)
{
$questions .= $question5."|";
$number_of_questions++;
}
$questions = mysql_escape_string($questions);
//Create Project
$sql = "INSERT INTO project(account_id,project_name,autoresponder_email,admin_email,number_of_questions,questions) values('$account_id','$project_name0','$autoresponder_email','$admin_email','$number_of_questions','$questions')";
$sql_execute = mysql_query($sql);
if(!$sql_execute)
{
echo "ERROR CREATE PROJECT :".mysql_error()."<br>";
}
$project_id = mysql_insert_id();
//Now get the template
$content = file_get_contents("squeezepagetemplate/template.html");
//Now Embed the Tracking Tag Into Gateway
$script = $_SERVER[PHP_SELF];
$server = $_SERVER[SERVER_NAME];
$script_split = explode("/",$script);
$num = count($script_split);
for($i=0;$i<$num-1;$i++)
{
$script0 .= $script_split[$i]."/";
}
$script0 .= "visit.php?p=$project_id";
$visit = "http://".$server.$script0;
$pattern = "/visit.php/i";
$replace = "$visit";
$haha0 = preg_replace($pattern,$replace,$content);
//Now Embed The Project ID
$pattern = "/\%project_id\%/i";
$replace = $project_id;
$haha = preg_replace($pattern,$replace,$haha0);
//Now Put In The Answers
$questions = stripslashes($questions);
$questions_array = explode("|",$questions);
unset($question_html);
$question_html = "<tr><td colspan=3 align=center><table width=100%>";
for($i=0;$i<$number_of_questions;$i++)
{
$ii=$i+1;
$question_html .= "<tr><td align=right><input type=radio name=question value=$ii></td><td> </td><td align=left>$questions_array[$i]</td></tr>";
}
$question_html .="</table></tr></td>";
$pattern = "/<tr><td colspan=3 align=center>\%questions\%<\/td><\/tr>/i";
$replace = $question_html;
$html_content = preg_replace($pattern,$replace,$haha);
//Now Generate The Main Page
$question_id = 0;
//$head = "<html><head><title>$project_name</title</head><body>";
//$end = "</body></html>";
//$content_to_write = $head.$html_content.$end;
writetofile($project_id,$project_name,$html_content,$question_id);
//<br>Go through the 4 simple steps below to generate your Super Squeeze Page<br><br>
//<div class="main-body"><h2> Create New Project - Step 2 Of 4</h2></div><br>
//<center>
//<br>
//Below is your Super Squeeze Page. Edit it in any way you wish (i.e change fonts, add pictures etc). <br><br>
//Please do not make any changes to the <b>Opt in form and radio button answers as they are controlled by the SSP system!</b> <br><br>
//Click on the submit button at the bottom of this page to continue<br><br>
//<table align=center>
//<br>
//<br>
//<form action="step3.php" method="post">
require "edithtml_step2.php";
//<center><input type="submit" value="Go To Step 3"></center>
//</form>
//</table>
//</center>
//</form>
require_once 'footer.php';
?>