PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi, I'm having an if statement problem. This gives me a unexpected T_STRING on line 6 which points to the variables at the top. However what I don't get is that if there is no $_POST['upload'] this should be skipped and therefore offer no problem at least to open the page. Anyone have any ideas why I might be getting this error?
Well, that was the only syntax error in this file. Are you sure it's not in library/config.php or library/opendb.php? Read the error message carefully and post it here.
There are 10 types of people in this world, those who understand binary and those who don't
Parse error: syntax error, unexpected T_STRING in /home/biomagn1/public_html/recommendingpeople.com/ya.php on line 6
I've checked that file sharing is on. I don't know what else could be the issue. The table is in Innodb - that's not a problem is it? What else could I look for?
I have a feeling that the problem is with variable $tmpName. If I remove that one the error moves along until $tmpname is needed. How can i get around it?
If it is shared hosting then perhaps your host has restricted your ability to upload files, for whatever reason. There are various ways to amend the upload_tmp_dir setting, if your host allows you to do so, take a look at the points listed here.
From what I have seen in the php manual the upload_tmp_dir with no value shouldn't be a problem. And yes I can change php settings with my host if needed, but I have no idea why this is not working
The temporary directory used for storing files when doing file upload. Must be writable by whatever user PHP is running as. If not specified PHP will use the system's default.
I opened a new thread as the problem would seem to be diferent. viewtopic.php?f=1&t=127508
If{} else{} seemed to be fine even if I do not understand exactly why the if{} was not skipping over the problem if there was no $_POST['upload']