Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Fukushousha

  • Rank

Contact Methods

  • MSN
  • Website URL

Profile Information

  • Location
    Thessaloniki , Greece
  1. Ho! That worked very nice. Deirdre's dad that is what I did. Just stored it in xml so I could edit it easily and have some form of knowledge database, since the forms represent knowledge.My problem was solved by justsomeguy's very simple remark. I had no idea that <form ..... action="" .... > equals <form ..... action="<?php $_SERVER['PHP_SELF']?>" .... > . What I wanted to do worked now. Thanks!
  2. Yeah I know it is server side but I thought that it could work like that. Hm ... can anyone think of a workaround for this? Any way to both dynamically create the forms and be able to call the whole php script again whenever the php submit button is pressed?
  3. Hello all.I have a problem. Up to now the calls to $_SERVER['PHP_SELF'] worked like a charm in any form in my website. Now I made something like ... a dynamic form generation. I am making the various forms by use of Javascript.LAter the javascript function is called inside a php script. Example of .js script: function fillSetArt(div){ //we load the XML file into xmlAudioObj xmlArtObj = loadXML(xmlArtObj,'artsoft.xml'); //this will be the function which will read the file and extract the data we need! xmlArtObj.onreadystatechange = function() { var text = '<form name="userSkills" i
  4. Yeah I know the $_FILES['file']['type'] but I was reluctant to use it because of the post I linked by someguy in my post above. Anyway I will figure something out. Thanks for the advice people
  5. I used this method because that is what I understood from this post by someguy.And yes I do realize there are too many formats out there >_< It would be 100% simple to tell them I accept only these 3 and that's that. Would that be bad? I am tempted to do so.
  6. Hello,A really quick question to which I just can't find the answer. Basically with my fetch user image I get the image type from the DB (which is stored by looking at the extension) and then give out the appropriate header like that : switch($imagetype){ case ".jpg": header("content-type: image/jpeg"); break; case ".gif": header("content-type: image/gif"); break; case ".png": header("content-type: image/png"); break; default: die("Something is really wrong if you get here.You got no imagetype from the DB");} My question is .. okay ... but what for all other image formats. I actually
  7. Sorry for re-bumping my post but I finally managed to solve it. I would like to include the solution in this post since other people might find themselves in my situation. So ... here goes:I tried running the form standalone to see if $_FILES got written. It actually did!So the problem was code-related and not configuration. In my code another php script was included. It was login.php.Login.php contained 2 more forms. As one would expect of a login script ofcourse. I spent the last 2 days searching for empty $_FILES reasons so I learned many different reason why this would happen. One o
  8. I am really sorry for bumping my own post but this is ridiculous. I completely uninstalled EasyPhP and saved all of my work in a separate file. I downloaded the XAMPP php/apache/mysql bundle and installed it. Then moved all of my work in the new server, re-made all of my configurations and was good to go.I really thought that it would work. BUT NO! Still ... $_FILES is empty after uploading. I don't know what to do anymore. This was like the last resort ... and it did not work.I am including the whole .php file for which I am talking about ( the one where the user file upload form is ): <
  9. Quoting from the php manual about headers.
  10. Since it is in another script just save the value of the form script and use a php header to redirect.If your problem is the header syntax then here you can get more info.
  11. Yeah you are right. I should have seen that tab. Anyway, with that gone I still get an error, only this time as you predicted a permission denied one.BIG EDIT:Well ... I was wrong. I was still sleepy and did not write the path correctly. No ... that was not the problem. I can create a file in that directory. So, it can't be because php can't write in the servers tmp directory since it actually can.Damn ... still at point one.
  12. I had tried uploading various sizes of files ... all were "Done" in an instant, even though I am operating on a local server, still it is not normal.BUT I think we might have something with the last thing you said. I just commented everything out from the previous part of code I was working on and put this : if(isset($_POST['subpic'])){ //the temporary file server directory //might use this as a global somewhere later //HAVE TO CHANGE FOR UPLOADING THE SITE IN A WEB SERVER //$tempdir = 'C:\Program Files\EasyPHP 2.0b1\tmp'; //phpinfo(1); file_put_contents("C:\eleos.txt","eleos re paidia");.
  13. Thanks for trying to help justsomeguy. I really appreciate it. Unfortunately thought that wasn't it. My php.ini was already configured like that except from the display_startup_errors setting which was set to off. Even with that set to on though I still get no error.It's as if I never click the file upload button.
  14. Yeah that is what I was saying too. I had similar code, a little more complicated but ... for testing's sake I tried it like that too. Still $_FILES is an empty array.Unfortunately I can't think of anything else. Something must be wrong with my whole installation? I used easyphp to install php, apache and MySQL. But up to now (everything else apart from file uploading) it worked fine!
  15. I will do that with the php.ini thanks for the info!As for the form I can't see what can be wrong with it. I had posted it in the previous topic too. Here it is again: <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="200000" /> Want to change your picture?<input type="file" name="userpic" id="userpic" /> <input name="subpic" type="submit" value="Upload" /> </form> All I do somewhere later is check if the subpic is set at the $_POST array and if it is so I am
  • Create New...