put a ; at the end of line 31 and see if it still gives you the error.

Steve

At 10:33 AM 5/25/2002 +0100, you wrote:
>Hmm, can anyone explain why I'm getting this error?
>
>Parse error: parse error, unexpected T_IF in 
>/usr/local/htdocs/san.loc/upload-img.php on line 34
>
>Code reads:
>
>11:#--if form submitted then process file upload
>12:if($HTTP_POST_VARS['ttl']) {
>13:
>14: #--check if there is already a picture called this
>15: include $DOCUMENT_ROOT . 'incs/db.php';
>16: @mysql_select_db("infoNav") or die("unable to connect to table");
>17: $qry = "SELECT ttl FROM imgLst WHERE site = 
>$HTTP_SESSION_VARS[site_no] AND ttl = '$HTTP_POST_VARS[ttl]';";
>18: $imgTst = MYSQL_QUERY($qry);
>19:
>20: if(mysql_numrows($imgTst) < 1) {
>21:
>22:  #-- check file type
>23:  $ulf = $HTTP_POST_FILES['uplfile']['type'];
>24:  if($ulf == 'image/pjpeg' || $ulf == 'image/gif') {
>25:
>26:   #-- get ext
>27:   ($ulf == 'image/pjpeg') ? $ext = '.jpg' : $ext = '.gif';
>28:
>29:   #-- create unique filename
>30:   $flNme = '\/imgs\/user-imgs\/' . time() . $REMOTE_HOST . $ext;
>31:   $FulflNme = $DOCUMENT_ROOT . $flNme
>32:
>33:   #-- check file is realy uploaded for security then copy to store folder
>34:   if (is_uploaded_file($HTTP_POST_FILES['uplfile'])) {
>
>Thanks
>
>Zac
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to