By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,039 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,039 IT Pros & Developers. It's quick & easy.

problem with copy

P: n/a
Hi all,
I don't understand why this script want work

if($_POST['students'] == true)
copy("$file" , "/students/$file_name")
else echo "no check";

Parse error: parse error, unexpected T_ELSE

really thanx :)

Jun 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You forgot the semicolon:

Davide wrote:
if($_POST['students'] == true)
copy("$file" , "/students/$file_name") <-- put a semicolon here
else echo "no check";

Parse error: parse error, unexpected T_ELSE


Jun 15 '06 #2

P: n/a
Davide schrieb:
Hi all,
I don't understand why this script want work

if($_POST['students'] == true)
copy("$file" , "/students/$file_name")
else echo "no check";

Parse error: parse error, unexpected T_ELSE

really thanx :)


I would change two things - at first i would use braces. And the second
thing (it's the error) - use the semikolon at the end of a line!

if([..]){
[do s.th.];
} else {
[do s.th.];
}

good luck
Johannes

--
Emails ohne "[nospam]" im Betreff werden kommentarlos gelöscht.

Jun 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.