if($_POST['title'] != ''){ $target_path = "../images/design/"; $title = $_POST['title']; $file = "basename($_FILES['uploadedfile']['name'])"; $sql = "INSERT INTO xxx (id, title, imglink) VALUES(0, '$title', 'http://emes.xaa.pl/images/design/$file')"; } else{ } else { } ?>
Poloczenie z mysql jest wczesniej. No i wyskakuje blad php :
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/emes/public_html/php/uploader.php on line 20
chodzi o linijke z ustawianiem zmiennej $file. Co jest nie tak?