Parse error: syntax error, unexpected '<' in /Applications/XAMPP/xamppfiles/htdocs/i

Parse error: syntax error, unexpected ‘<’ in /Applications/XAMPP/xamppfiles/htdocs/imagesave.php on line 12

hi guys - cannot get past this very basic error. I have tested all the given xammp php files and they work. There is a test mysql file and it too has no issue connecting. However, this very basic tutorial, i cannot get past. Below is my code.

Helpppp :cool:

		<title>Upload an image</title>

<form> action="index.php" method="post" enctype="multipart/form-data">
	<input type="file" name="image"> ,input type="submit" value="Upload">


// connect to database
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("databaseimae") or die(mysql_error());



If you are getting this from a tutorial then I suggest you don’t use that tutorial. You’re using the old MySQL library and it’s going to be removed sooner or later and your codes will not work.

As for your topic.
<?form> This can be your problem. It should be </form>

Plus the whole input field is wrong.

<input type="file" name="image">
<input type="submit" value="Upload">

Also, this is a minor problem you could of solved it yourself. Just read the error message and look for the exact lines and figure out what’s wrong with it. I’m not going to lie, but if you’re struggling with basic HTML, I’m not sure how you’re going to do with PHP.