waterfoul 0 Report post Posted October 29, 2005 (edited) i have this code <?phpif($_POST['user']=="" or $_POST['pass']=="" or $_POST['host']=="" or $_POST['root']=="" or !isset($_POST['run'])){ print('<form method=post name=form>'); print('FTP username <input type=\'text\' name=user value=""><br>'); print('FTP password <input type=\'password\' name=pass value=""><br>'); print('FTP Host <input type=\'text\' name=host value=""><br>'); print('FTP Root Directory <input type=\'text\' name=root value=""><br>'); print('<input type=\'hidden\' name=run value="1">'); print('<input type=\'submit\'>');}else{$ftp_server = $_POST['host'];$ftp_user = $_POST['user'];$ftp_pass = $_POST['pass'];$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server please refresh and do not click retry");// try to loginif (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n"; if(!isset($_POST['out'])){ ftp_chdir($conn_id,$_POST['root']); $title=""; $lib=implode(array(''),','); $topimage=''; $topcolor=''; $sideimage=''; $sidecolor=''; $midimage=''; $midcolor=''; $links=implode(array('')); $linkimage=implode(array('')); print('<form method=post name=form>'); print('<input type=\'hidden\' name=user value="' . $_POST['user'] . '"><br>'); print('<input type=\'hidden\' name=pass value="' . $_POST['pass'] . '"><br>'); print('<input type=\'hidden\' name=host value="' . $_POST['host'] . '"><br>'); print('<input type=\'hidden\' name=root value="' . $_POST['root'] . '"><br>'); print('<input type=\'hidden\' name=run value="1">'); print('<input type=\'hidden\' name=out value="1">'); print('Page Title <input type=\'text\' name=title value="' . $title . '">'); print('Any files in the library folder you would like to use in ANY page <textarea name="lib" cols=5 rows=8>' . $lib . '</textarea>'); print('The top background image, set to "" for none <input type=\'topimage\' name=title value="' . $topimage . '">'); print('The top background color <input type=\'topcolor\' name=title value="' . $topcolor . '">'); print('The side background image, set to "" for none <input type=\'sideimage\' name=title value="' . $sideimage . '">'); print('The side background color <input type=\'sidecolor\' name=title value="' . $sidecolor . '">'); print('The middle background image, set to "" for none <input type=\'midimage\' name=title value="' . $midimage . '">'); print('The middle background color <input type=\'midcolor\' name=title value="' . $midcolor . '">'); print('The links for your side bar<br>(note: if theres a link without an image below it will not show) <textarea name="links" cols=5 rows=8>' . $links . '</textarea>'); print('The images for the links for your side bar <textarea name="linkimage" cols=5 rows=8>' . $linkimage . '</textarea>'); print('<input type=\'submit\'>');}else{ echo "Couldn't connect as $ftp_user\n please refresh and do not click retry";}// close the connectionftp_close($conn_id);?> and i get this errorParse error: parse error, unexpected $ in /home/waterfou/public_html/Editor.php on line 56does any 1 see the problem Notice from cmatcmextra: Added quote around the error message. You must use quotes, even when copying from your own site! Edited October 29, 2005 by cmatcmextra (see edit history) Share this post Link to post Share on other sites
Spectre 0 Report post Posted October 29, 2005 The error I received: Parse error: parse error, unexpected $end in test.php on line 54This is because you aren't closing all your if() statements. You need to include a closing squigly bracket ('}') to inform the script that you wish to end the statement there (or depending on your style of coding, there are other ways to acheive this). Share this post Link to post Share on other sites