Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I am trying that other format that I saw from kenrbnsn currently as well.
  2. Hmm it is still giving me the exact same improper functionality here is the new section of code. [code] if(!is_uploaded_file($_FILES['file']['tmp_name'])){         $errorhandler .= "No file has been uploaded<br />";         $filemanager = false;         }                  if ($filemanager == true) { $_accepted_extensions = array('.mpeg', '.mpg', '.wav', '.avi', '.mid', '.midi', '.doc', '.htm', '.jpg', '.jpeg', '.jfif', '.pdf', '.txt', '.wav', '.html', '.gif', '.qt', '.mp2', '.mp3');     if ($filemanager == true) {      $extension_withdot=".";      $info=pathinfo($_FILE['file']);      $extension_withdot.=$info['extension'];      if(in_array($extension_withdot, $_accepted_extensions)) {                     $filemanager = true;                     $management = true;                         }else {                         $filemanager = false;                         $management = false;                         $errorhandler .= "You have attempted to upload the wrong file type<br />";                         $errorhandler .= "We only accept mpeg, mpg, wav, avi, mid, midi, doc, htm, jpg<br />";                         $errorhandler .= "jpeg, jfif, pdf, txt, wav, html, gif, qt, mp2, mp3 formats<br />";                         $errorhandler .= "To request new file types email<br />";                         $errorhandler .= "information@theyellowpagesnetwork.com";                         }                     }                 }                                          if ($management == false || $filemanager == false) {                     echo "{$errorhandler}";                     }[/code] That is the new code, with the same functionality, you can try it over at [a href=\"http://www.funnyemailforwards.com\" target=\"_blank\"]http://www.funnyemailforwards.com[/a] and you will see that if you try to upload an accepted file it gives that message, or an unaccepted file. I tried a .txt, and .doc, and neither of them worked, but I tried the others and it gave me the same message.
  3. Also any advice per security as far as what files to accept or not, based on what I have is welcomed as well.
  4. That is a pretty deep system, I like per project, if I was to do that project, I would probably charge between 400-600 easy, if he's a pretty laid back person that understands the value of hardwork, you can probably get around 600 for that, if you go by the hour, charge somewhere between 20-60, some designers charge like 65-90 per hour,a nd that might be good, I n ever calculated by hour. But either way it's very unlikely you would overcharge as long as your reasonable.
  5. You are using tables, whoever built it was slow, because it makes it harder to read, I don't see any obvious syntax errors, and there is no includes trying to include that file, a search of google for errors related to sql in that form come up with this telling me it has something to do with a table error, so maybe your database itself has an error in it, if so debug it using phpmyadmin, maybe there is a possibility someone fed you bad data, it could have been a lot of things. Go to www.google.com and search .myi it will fill you in on all possible information relating to your error, here is the first entry there. [a href=\"http://www.modwest.com/help/kb6-230.html\" target=\"_blank\"]http://www.modwest.com/help/kb6-230.html[/a]
  6. Don't waste your time letting it do that for you, sql itself is very simple to learn, it's when you are using php to access sql is when it starts getting hard, go to someplace with simple to understand sql syntax if you are trying to just create a table just do CREATE TABLE tablenamehere and it will create a table, build onto that to do more with your tables, if you need more help just ask, BUT BE SPECIFIC. Like something specific you want to do.
  7. same problem, and file was the name of my form element, here is my form. [code]<form name="sendinformation" id="sendinformation" enctype="multipart/form-data"             action="apex/acceptfiles.php" method="post">                 <label for="type">What Type of Funny is it:</label>                 <select tabindex="1"name="type[]" id="type">                 <option>Video</option>                 <option>Picture</option>                 <option selected="selected">Joke</option>                 <option>Song</option>                 <option>Poem</option>                 <option>Story</option>                 </select><br />                 <label for="name">*Name the Funny:</label>                 <input tabindex="2" name="name" id="name" type="text" maxlength="80" /><br />                 <label for="keywords"><a href="keywords.htm">*Keywords:</a></label>                 <input tabindex="3" name="keywords" id="keywords" type="text" maxlength="80" /><br />                 <label for="file">*Upload your file here:</label>                 <input tabindex="4" name="file" id="file" type="file" /><br />                 <input tabindex="5" name="submit" id="submit" type="submit" value="Do It!" />             </form>[/code] The thing is, it properly tells me whether it has been uploaded or not, but when it starts trying to search through the array it's doing something wrong, I have something off somewhere, at that part of the script, it tells me that it didn't find a match, whether I use a proper extension or not. It returns the message I have in the error string. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]You have attempted to upload the wrong file type We only accept mpeg, mpg, wav, avi, mid, midi, doc, htm, jpg jpeg, jfif, pdf, txt, wav, html, gif, qt, mp2, mp3 formats To request new file types email information@theyellowpagesnetwork.com[/quote]
  8. if you mean what I think you mean you should never use uninitialized variables, what you could do, is put what the person inputs into an array, and use it, or database the results, explain more what you mean.
  9. Ok I must be missing something, the script runs perfectly, no syntax, or runtime errors. BUt something is going on with me checking the extensions, I tried pulling out .htm, .html files, and .jpg, and .txt files and it's still tellingme there not accepting that file type here is what I have for that portion of the script. [code]if(!is_uploaded_file($_FILES['file']['tmp_name'])){         $errorhandler .= "No file has been uploaded<br />";         $filemanager = false;         }          if ($filemanager == true) { $_accepted_extensions = array('.mpeg', '.mpg', '.wav', '.avi', '.mid', '.midi', '.doc', '.htm', '.jpg', '.jpeg', '.jfif', '.pdf', '.txt', '.wav', '.html', '.gif', '.qt', '.mp2', '.mp3');     if ($filemanager == true) {      if(in_array($_FILES['file'], $_accepted_extensions)) {     $filemanager = true;     $management = true;     }else {     $filemanager = false;     $management = false;     $errorhandler .= "You have attempted to upload the wrong file type<br />";     $errorhandler .= "We only accept mpeg, mpg, wav, avi, mid, midi, doc, htm, jpg<br />";     $errorhandler .= "jpeg, jfif, pdf, txt, wav, html, gif, qt, mp2, mp3 formats<br />";     $errorhandler .= "To request new file types email<br />";     $errorhandler .= "information@theyellowpagesnetwork.com";                         }                     }                 }[/code] Do I have the in_array function set up right. The way I read it, is it's saying if the $_accepted_extensions is shown in files then it will work. I am on a unix apache server by the way.
  10. Perfect, she's running like a brand new car now. Thanks.
  11. Yes you can use this. [a href=\"http://www.debianhelp.co.uk/syslog-ng.htm\" target=\"_blank\"]http://www.debianhelp.co.uk/syslog-ng.htm[/a] If not go to www.google.com and type in the same thing you said "search syslog from a web interface"
  12. Another quick question, Again I hope to just get pointed in the right direction. I need to figure out I want the files to move to a particular folder, I know how to do this, how do I get the file to originally upload, I have done all my original validation, but when I use [code]if(!is_uploaded_file($_FILES['file'])) { $errorhandler .= "No file has been uploaded<br />"; $filemanager = false; }[/code] That sets the path for me to then do my extension checks, but the thing is it still gives me the error message, it works through my whole script, then at the end when it returns the error message, it returns the error messages from the fields that are blank, and then returns this message as well, even when I take a test file put it on there, and click submit. thanks, do I need to do something specific to get it to "upload" first.
  13. Thanks exactly what I was looking for, I have some stuff to work with now, thanks for the help.
  14. I have a question, I don't want to be flat out told this, because I am working on this, trying to learn, I just want some quick guidance, pointed towards a function, or group of functions(preferably in the core php language), if not I can check on extensions. I am wanting to find a way, for me to take an array, and use that array to search a string for the existence of the array characters, for instance. I have a list of extensions I Want to accept as file attachments, I just need some kind of function I can use to create a construct to run all of those extensions through the string $_FILES['file'] I already checked to see if it was uploaded first is_file_uploaded function so now I am working on a portion of my script to screen out anything but those filetypes. THanks. If you can point me to something, doesn't matter which area, I am already familiar with regex, and everything.
  15. Buy a copy of Programming PHP first version(don't know about the second), from a company called oreilly, by the time you read through there 2-3 pages on regex, you will understand fully all of the basics of regex, until you get down to themore involved stuff, you won't be able to make your own at that point, but atleast you will know what you are reading, and have quick references, you can look up anything under there regex, perl compatible, and post ex
  16. By what I have been told, and what I learnt you should never have a need for the system() function and if you ever use it for user input as well it's a security risk.
  17. Perfect, so I guess if I was doing something and I was being time, then joomla would be good to set up, I see what you mean. I will see about the control panel. and I can just create a page, that takes care of all of that. I was wondering about that, because I am building a gallery on www.moondancedesign.com but it's taking too long, and I am doin git for free, and she's wanting some pictures landscape some portrait, but being able to add them in as she wants too. Hmm. and the guy at www.funnyemailforwards.com is wanting 100% access over everything in the database, and can add, remove anything, add remove peoples email address to and from the list, adn everything else, he's wanting complete and total control over it.
  18. Here is what I want to find out, I have been looking at joomla most of the day, and cmsmadesimple. A cms is something I am not looking for, I don't know how to explain it, I want something to where I can build the site, using dreamweaver(code view), and do all the css/xhtml myself, and do all the php/sql programming myself, and javascript, with the regular ftp'ing and everything. Then I want to find some kind of control panel, for AFTER the site is built, my client later on down the road can go to it and do some basic stuff, for instance if I have a picture gallery I added into the site, he could add pictures, and picture sizes himself, delete and remove specific things from the database, and things like that. Other than that, that's it, maybe add new pages, with new content, but I don't see hte point. I just mean something to like connect to a pre-existing site, and allow for the the person to interact with the website I already made for them, joomla seems more to me like a wysiwyg editor, but with the ability to do a lot of things quicker, but I spend my whole development time in a joomla login area, making me feel more like I am using a wysiwyg editor, with not enough control, someone has to know how I feel, some ideas, something to point me in the right direction, this is driving me crazy.
  19. ahh, thanks I appreciate it.
  20. Links as in a place for the file to be clicked on and downloaded to there computer right,
  21. www.funnyemailforwards.com the keywords, I have to validate them to seperate by commas for the database don't I.
  22. I have started on my script, and set up my basic error handling, and at this point I have decided what I am going to do about screening filetypes. What I am going to do is create an array of file types I am accepting(I was going to do one of ones I wasn't but there are too many to list), so I am putting the files on the server in a folder instead of in the database. So I will work on all that when I get there, I have to take into account, I am unsure whether to have the files as downloadable links, or embedded in the page so they can be immediately viewed, heard or whatever. I want some advice on waht file extensions I should accept, I have some of them together so far, but any here you think I should take out or add, would be a great help. Or ones you might know i would encounter severe difficulty with handling once I get them uploaded. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]$_accepted_extensions = array('.mpeg', '.mpg', '.mpe', '.wav', '.avi', '.mid', '.midi',[/quote] I will probably have more in there by the time this comes around, but any advice would be greatly appreciated. thanks.
  23. I am trying to find some regular expressions to check for commas after each word, is there any you know of I tried google searches with no luck, and www.regular-expressions.info doesn't seem to have anything specific either.
  24. What I want to do is learn some more, then I will start making php classes, for like connecting to database, and everything, or functions, then start including files, and using functions instead of rewriting all code, I will then create me some custom stuff. Like a script, that can be slightly modified for all purposes, when doing form validation and submission, and that has all the functions prepared to connect to a database using pear, so I can change around to do it with all databases, rather quickly.
  25. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]You got 2 years of php exsperience and you dont know where the page is to alter what a joke lol.[/quote] If you feel like that, I feel sorry for your abilities in interacting with other humans. I said specifically my "experience" is limited, my knowledge is not. My 2 main studies currently have been "security" and "performance" in scripts, not how to write them, I just started my career 2 weeks ago for gods sakes. You see I have already been appointed head of security, seo, and submission for one company, temporarily, I don't suck, I just don't know much about programming and databasing. I know sql, but I am getting better, I am not familiar with these damn 3rd party programs yet either, I am not asking about joomla, I am asking about cms made simple, it's new to me. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]With what you no from your website telling us you should easly find the pages or database entrys.[/quote] Again I have no experience, I just have studied knowledge, I recently started when I had the advice of getting my nose out of books and getting my hands on it. Sorry if I sounded offensive, but telling me I was a joke, it's a nice way to talk to someone. I know more about Web Sites than you would suspect, I am just new to programming/databasing. www.funnyemailforwards.com to me was the hardest thing I ever encountered, but I am still fighting, and I have tripled my knowledge with that one site, and gotten some form to my programming. I decided what I wanted to do now, I am going to go ahead, and start from scratch if testing cms made simple, I want something that doesn't necessarily have an admin like this, I want one that can be used from a editor like notepad or something else. For the designer, adn the admin page, can have parts connected too, I will work on doing this in the future, I want to play with cms mdae simple, I am installing it now and giving it a try on one of the sites, and see if it's like I wanted, if not, I have other ideas. I am not necessarily inventing the wheel, but other developers out there, when they get to the point where they are good, they start created classes, then templates, and scripts for everyday things, I would rather earn my way through experience and time, that go to other things.
×
×
  • 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.