Jump to content

hendo90

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by hendo90

  1. Still not sure I have it set up right? To submit the form, the submit button links to the .php?
  2. Thanks. Not sure its what I'm after though. I already have the whole form and stuff, just need to execute. ( i think) Was just wondering if I was missing a simple close code or something, as I said, I know nothing about php.
  3. I currently host it on a shared hosting server on godaddy. This is what I have come up with so far: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-21081199-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <php $max_allowed_file_size = 15000; $allowed_extensions = array("mp3"); //Validations if($size_of_uploaded_file > $max_allowed_file_size ) { $errors .= "\n Size of file should be less than $max_allowed_file_size"; } //------ Validate the file extension ----- $allowed_ext = false; for($i=0; $i<sizeof($allowed_extensions); $i++) { if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0) { $allowed_ext = true; } } if(!$allowed_ext) { $errors .= "\n The uploaded file is not supported file type. ". " Only the following file types are supported: ".implode(',',$allowed_extensions); } copy ($_FILES['Image']['tmp_name'], uploads/".$_FILES['Image']['name']) or die ('could not upload'); > <body> <p>tipsntutorials.com/tutorials/PHP/67 </p> <p> </p> </body> </html> Thats straight out of DW.
  4. Been working on a xhtml website for university. Wanted to add a place where artists for hendohiphopshow.com could submit music. Did some research and came up with 'some' code. Not sure if it is close, or completely off. I have NO php experience. So any input/help would be a major help. http://www.hendohiphopshow.com/music_form.html http://www.hendohiphopshow.com/scripts/uploadmusic.php Thanks P.S. I have already handed this into Uni, I am developing this for my own use now.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.