Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. Sure. Have you ever heard of a program called WebStudio? You might be interested. It helps with making websites on the design side of things.
  2. Don E

    Upload Max File Size

    And many ways to go about how to accomplish your objective, but some of those ways can be considered bad practices or not the route to take(referring to coding something). Depends I guess.
  3. Don E

    Debugging test

    "Heart's on Fire" is a pretty good song! It was featured in the movie Rocky 4.
  4. Don E

    Debugging test

    In light of JSG exercise post that began this thread, here's one for the fun of it that I saw somewhere once:What is the output of the following PHP script? <?php define('VALUE', 0); if(strlen(VALUE) > 0 ) { echo 'Hello'; } else { echo 'Goodbye'; } ?> I'm sure you PHP veterans will get this one with ease. If you know the answer, do the spoiler thing. BUT, be honest with your answer and post your answer first before testing the above.
  5. Good attitude Eduard! Well, I would probably go with Gimp since it's free and easy to use from what I understand. But one thing to remember is that Gimp is an image manipulation program. I'm not sure if you can use it to make vector based drawings etc? If looking to make vector-based images etc, CorelDraw or Adobe Illustrator is probably the best option.
  6. Don E

    Upload Max File Size

    Thanks JSG, So Called and boen. After analyzing all my options, best if I just go with my intended option which is in post 1.
  7. Don E

    Upload Max File Size

    So Called, Great suggestion. Will definitely consider/remember this. Thanks. JSG, Even if ini_set("upload_max_filesize", "2M"); is placed at the top of that particular PHP file/script?
  8. Don E

    array notation used

    Jimfrog, What I did to best understand what's going on is made a upload form with two input fields like so: <form action="uploadtest.php" method="post" enctype="multipart/form-data"> Send these files:<br /> <input name="userfile[]" type="file" /><br /> <input name="userfile[]" type="file" /><br /> <input type="submit" value="Send files" name="submit" /></form> Then used print_r to display and this is what the above will look for the $_FILES array: Array ( [name] => Array ( [0] => img.jpg [1] => doc.txt ) [type] => Array ( [0] => image/jpeg [1] => text/plain ) [tmp_name] => Array ( [0] => C:\wamp\tmp\phpF55A.tmp [1] => C:\wamp\tmp\phpF55B.tmp ) [error] => Array ( [0] => 0 [1] => 0 ) [size] => Array ( [0] => 81619 [1] => 70 ) ) In the example apple, the first array index which is called 'name' will hold/container another array with the names of the uploaded files in that array's index elements. If another input field is inserted in the form, a third name will appear in index 2 of that array, etc.
  9. What I mean't was, yes of course know what's out there, but not to worry about it by fretting about it, being intimidated etc. Apple makes great products because they know what's out there, but once they see what's out there, they ask themselves how can we improve our product(s) to be one of the best out there, and focus there instead of them sitting around saying "man, HP and Dell is making really interesting laptops. Microsoft is everywhere.. Oh my.. what are we going to do? The competition is stiff and since it is, maybe we should just quit or go into some other kind of work or something.. what do you think Bob?" Hopefully you get my point. Just my two cents.
  10. To me Adoble Photoshop/Illustrator are confusing and CorelDraw is the most simple. My advice to Eduard or anyone for that matter is... try to be the best designer/developer YOU can be. Don't worry about the competition or how better someone else is etc. Just focus on bettering yourself at what you want to do.Instead of worrying about 'competition', focus on making your services/products the best you can/have to offer. Once you do that, things will fall in place for you but above all else, have a good mental/overall attitude about it all.
  11. Don E

    Upload Max File Size

    Thanks for the replies.One more thing... I noticed some people sometimes in their form have a hidden input field that has the name attribute named like this for example: MAX_FILE_SIZE and the value a certain number of bytes.. Is this necessary or just personal preference on how some people take care of checking file size when uploading? Because why not just check the file size in the process script like so: if($_FILES['file']['size'] > 2097152 ) //2mb echo 'File over 2MB';
  12. Don E

    Upload Max File Size

    Hello everyone, Is the following the correct way to have one page of your site be allowed to upload a file that's say only 2MB in size and another page be allowed 8MB for example?I believe in the php.ini 2MB is the max? What would be suggested... set the php.ini max to say 8MB because of 8MB is the max that will be allowed for the whole site and then for individual pages where it will be less than 8MB, just do a check on the file being upload and if it's over 2MB, not allow it? Thanks.
  13. This didn't display anything for me but an error in firebug: <?php$str = "Hello World";echo '<script type="text/javascript">';echo 'alert(' . $str . ')';echo '</script>';?> But when I added double quotes to the alert like so: $str = "Hello World";echo '<script type="text/javascript">';echo 'alert(" '. $str . ' ")';echo '</script>'; .. it worked. This won't work according to my results: <?phpecho '<script type="text/javascript">';echo 'alert('Hello World')';echo '</script>';?> But when putting Hello World in double quotes instead, it will. Doing it with single quotes works like this: $str = "Hello World";echo "<script type=\"text/javascript\">";echo "alert('hello world' )"; // if removing the single quotes from hello world, it won't work. JS needs some kind of quotes here when using alert to alert a stringecho "</script>"; I guess it has to do with how PHP renders things in single or double quotes.
  14. Don E

    Debugging test

    I agree with niche.Thanks JSG for that detailed explanation/clarification.
  15. Don E

    Debugging test

    JSG, Check my work/explanation here and let me know if it's correct. I made my own version for testing it.
  16. Sure... On that particular page or where needed, create a div for example and design/style it to your needs/looks for that page and have it display: none via css when the page loads. Then when needed for whatever reason, use javascript and css to display it somewhere on the page; for example the top or center. You can even dim the background like some sites do giving it a nice effect when you have the pop up appear. Don't forget to give the user a way to close the pop up, like an X or something in the corner. When they click on it, it will set the div(the pop up) to display: none; thus disappearing.
  17. Don E

    Debugging test

    Going to take a stab at it...
  18. For this: $target = $target . basename( $_FILES['fileBrowser']['name']); You can just have: $target = $target . $_FILES['fileBrowser']['name']; This $pic=($_FILES['fileBrowser']);, you're probably wanting to do this: $pic = $_FILES['fileBrowser']['name'];
  19. Is that site a WordPress site or something of the like? I have noticed a trend today for website layout like in the above site DDs provided. It's where the header and footer stretch all the way across the screen and the body(content area) is narrow a bit and centered. I noticed a lot of wordpress sites have this layout.
  20. Check out this link on giving you an idea on how to make a sticky footer: http://ryanfait.com/sticky-footer/
  21. Yes noticed that, thanks for the confirmation.
  22. Don E

    include

    Here's basically what I think So Called is referring to and what I'm assuming you're trying to do: <?php$name_of_the_sender = 'John Doe'; // added this for obvious reasons $message = '<!doctype html><html><body bgcolor="#FFFFFF">'.$name_of_the_sender . ' invites you to join them on the site.<br /><br />Thank you';$message .= file_get_contents('sayhello.html'); // Don't think this will work with a php file because when echoing $message below, it outputs/includes everything even the php tags etc. If you look at the source file, you'll see php tags etc. sayhello.html only has <h4>hello world</h4> in it in this example.$message .= '</body></html>'; echo $message; // All the above even what's in sayhello.html is stored in $message.?> As for how you're going to do this with the email.php file though(using the above method, file_get_contents()), I'm not sure because of what's mentioned in the above comment.
  23. Are you just trying to get them centered at the bottom of your site? Take a look at the following and see if it helps you: <!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title></title><style type="text/css"> div {text-align: center; } div a {text-decoration: none;} </style></head> <body><div><a href="http://www.facebook.com"> <img src="facebook.ico" /> </a><a href="http://www.twitter.com"> <img src="twitter.ico" /> </a></div> </body></html> Just place your links/images in a div container and apply text-align: center to it. They should center since they're inline elements. To get rid of any under lines from lines, apply text-decoration: none to the a element that's inside the div container.
  24. So Called, To remove PHP's X-Powered-By header, is that done in the php.ini file?
  25. Fifth, if you were inspired to make a social networking site from the movie 'The Social Network', I won't be surprised.
×
×
  • Create New...