This question already has an answer here:
Parse error: syntax error, unexpected '<' in /home/u362231965/public_html/ucp/index.php on line 6
<?php
if (isset($_POST['submit']))
{
$result= file_get_contents('ftp://160:654fearboss@149.202.249.9/scriptfiles/users/'.$num1.'_'.$num2.'.ini');
<pre>echo $result; </pre>
}
?>
<html><body>
<form action="#" method="post">
Num1:<input name="num1"><br>
Num2:<input name="num2">
<input type="submit" name="submit">
</form>
</body></html>
What is the problem?
</div>
You had a syntax error. Use this:
if (isset($_POST['submit']))
{
$result= file_get_contents('ftp://160:654fearboss@149.202.249.9/scriptfiles/users/'.$num1.'_'.$num2.'.ini');
echo "<pre>".$result."</pre>";
}
<?php
if (isset($_POST['submit'])) {
$result= file_get_contents('ftp://160:654fearboss@149.202.249.9/scriptfiles/users/'.$num1.'_'.$num2.'.ini');
echo '<pre>'.$result.'</pre>';
}
?>
What's the problem. The problem is that u are using html code inside php code, This is possible but you are doing it the whrong way.
<pre>echo $result; </pre>//this is the wrong way
echo '<pre>'.$result.'</pre>';//the good way
You can read this how to use html inside php