Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. ignace

    PHPUnit

    PHPUnit is a unit-testing framework and not a pre-configured webserver like xampp PHPUnit does not have users. It's a PEAR package.
  2. The website looks good. critic on index_new.php - Properly cut out the logo - HTML also contains errors - Text needs more padding - The website does not render properly in FF and probably neither in Chrome or any compliant browser due to #2 - For images use vectors to create rounded corners
  3. - Your CSS still contains errors - How do you add a comment? (Make it more obvious) - Avoid here, click here, .. - The text in your header is lost use image replacement instead Nothing more to critic as there is very few to critic
  4. Home page: - Give the user the control to pause the image rotation or go back-, forward Weddings page: - Don't just sum up all albums (users hate to click alot) just start showcasing your latest wedding photos and give them the option to select a different album from a list like you did on your travels page and nightlife which has more appealing (keep #1 in mind) Layouts page: - Same as #2 - If a gallery is locked leave them out Travels page: - Nothing Nightlife page: - Nothing Events page: - Same as #2 Blog: - Integrate your blog don't include it using an iframe which is ugly Contact & Info: - Write the text out don't just put an image in there. Search engines can't read images nor can the speech synthesizers of visually impaired users and as far as I know they wed too. - Your HTML contains errors (<- severe) - So is your CSS (<- severe)
  5. @Rayth If you are to post code make sure it's correct: } echo $message; $qry = "INSERT INTO tablename(filename) VALUES('$_FILES['uploadedfile']['name']')"; $result = mysql_query($qry); Insert empty records in the database on each request + yield warnings because it can not find offset 'uploadedfile' in the $_FILES array. The correct complete code should be: <?php $message = ''; $file_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'path' . DIRECTORY_SEPARATOR . 'upload'; // ../path/upload on linux, ..\path\upload on windows if($_SERVER['REQUEST_METHOD'] == 'POST') { $basename = basename($_FILES['uploadedfile']['name']); $extension = pathinfo($basename, PATHINFO_EXTENSION); $filename = md5($basename); // security measure $target_path = $file_path . DIRECTORY_SEPARATOR . $filename . '.' . $extension; if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { $connection = mysql_connect('server', 'username', 'password') or trigger_error('Connection to the database server failed on \'server\' using \'username\''); mysql_select_db('mydatabase', $connection) or trigger_error('Failed to select database \'mydatabase\' on server \'server\''); $sql = "INSERT INTO table (name, uri, ..) VALUES ('$basename', '$target_path', ..)"; mysql_query($sql, $connection) or trigger_error('Query execution failed: ' . PHP_EOL . $sql . PHP_EOL . 'MySQL Info: ' . PHP_EOL . mysql_error()); $message = "The file $basename has been uploaded."; } else { $message = 'There was an error uploading the file, please try again!'; } } echo $message; ?> <form enctype="multipart/form-data" action="<?= $_SERVER['PHP_SELF']?>" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> <label for="uploadedfile">Choose a file to upload:</label> <input name="uploadedfile" id="uploadedfile" type="file" /> <br /> <input type="submit" value="Upload File" /> </form> Tips: - Don't run the same operation over and over (eg basename($_FILES['uploadedfile']['name'])) - Use resources only when absolutly required (lazy) - Use " only when you require the extra functionality (eg "\$variable value: $variable") use ' otherwise
  6. I go with Rayth indeed a nice website with some minor and severe errors: - CSS is invalid - About and contact page can not be found - Search button does not work - The user is lost once they click on a blog post they don't know where they are or how to get back - Form turns up empty when an error occurs during submitting - Form only reports one error when multiple errors occur - How can I lookup older posts?
  7. I don't like your approach honestly for example if I need 5 I'll take a pack of 5. If I need 10 I'll take a pack of 10. When I need 15 I'll... go somewhere else?? Create separate products for each and allow me (the customer) to select how many I want. In the example a pack of 10 and 5 (or 3 packs of 5). If I need 100 I'll add the pack of 20 and update my cart to 5. A customer will not buy 20 just because you don't support 15 and certainly not if your competitor is more flexible than you.
  8. Some more considerations: 1. Your design gives away you created it in less than 10 minutes which reflects to prospects you don't put much work in what you do or don't care what you do 2. The + and - are just ugly get rid of them and place the description in their appropriate place like title="" 3. Get rid of the lightbox it ruins the usability of your application, is ugly and just adds to point 1. Also worth considering Google does not open Lighboxes 4. Spend time on search engine optimalisation (deeplink to your pages, highlight important keywords, ..) 5. Integrate a blog and let everyone know (that wants to hear) that you are blogging and write good interesting articles, let clients see you are an expert in your field 6. Great you have experience in PHP, MySQL and stuff (don't know what that is, what is that?) but can you create websites? (Think like the client) 7. "I am currently attending Cuesta and Laurus College for web design" Oh he is a student we don't want to take such risk (Think like the client) -> LIE! 8. "Night calls may not be answered." do you think I'm going to lookup when it's night where you live? Sorry your competition makes it easier for me -> I answer calls between 9 AM GMT+.. and .. or LEAVE IT OUT 9. "check out my source code" ... What is that? Why do I need to care? Why do I need to answer questions when all I need is someone to create my website??? Don't use technical terms. If you can't explain it LEAVE IT OUT. If it's irrelevant LEAVE IT OUT Take a look at some portfolio websites other members have created: - http://parkercodes.com/ (Garethp) - http://www.adamswork.net/portfolio.php (MrAdam)
  9. Well to put it in other words you moved from 1992 to 1998
  10. Dividing your form into multiple steps is a great idea but IMO should not be stored between requests in a session nor in a db table. The best option is to store it client-side. There are numerous plugins available for almost each and every JavaScript framework out there that allows you to divide your form into multiple steps and send all the data in the last step. This is also backwards compatible meaning that those who don't have JavaScript turned on will get the entire form in one page. You can also use PHP if you don't want to bother writing JavaScript just do the same thing JavaScript behind-the-scenes does. It's a bit thougher if using PHP and you surely want something like the Zend_Form components of Zend framework or a form framework. The logic goes as followed: 1. Each form is represented by an object (all field names are prefixed with the form name eg step1_) 2. When the user submits the form all data is retrieved and prepended as hidden values to the second form 3. Step 2 is repeated until all steps have been completed 4. The last form in the chain submits all the data for processing
  11. You need Ajax to create the dynamic bit both for user A and B. However creating a table just specifically for this functionality is overkill but without a table it's hard to implement. The obvious choice would be if you store your sessions in a db table add the message to the session record that is viewing page X user A who is viewing the page then just retrieves in regular intervals it's session data. Then if you find the predefined variable(s) for page messages in the json response display it to the user viewing the page. Start an internal clock using setTimeout() (JS) that will redirect the user to the next page when the 60 seconds clock stops.
  12. Its hard to tell what you need to do without even knowing which CMS you are using. You can use the base html tag <base href="http://www.domain.co.uk"><!-- /> if xhtml -->
  13. Before capturing content on their website and displaying on yours. You should contact the ones who you are scraping. Because if they have something like "All rights reserved" you'll be in some trouble when they find out your stole their content. I can be wrong here about something maybe futile but better safe than sorry I say
  14. That is because REST is out of the loop here. All you need is PHP and its pletora of XML functions
  15. Then you are better off using: print '<hr />' . nl2br($friend_content);
  16. In your first script this is wrong: $file_last_modified = date(filemtime($_SERVER['SCRIPT_FILENAME'])); and should be: $file_last_modified = filemtime($_SERVER['SCRIPT_FILENAME']); In the second script what does $DOCUMENT_ROOT and $PHP_SELF output? var_dump($DOCUMENT_ROOT, $PHP_SELF, $DOCUMENT_ROOT$PHPSELF); I'm assuming that in both cases your code returned 0 or -1 for time which results in somewhere around 1970 (unix epoch)
  17. ignace

    Odd TR issues.

    If FF and Chrome do something strange then the problem lies with you. Because both browsers are the best around. It would be a lesser deal if it would bug in IE. IE is known for that... You know: BUGS Post your code.
  18. That should be: $body = "<strong>Contact Information</strong> \n"; b will be dropped in favor of strong
  19. You may have more luck with JavaScript ask in the JavaScript section
  20. use get_browser If you have php.ini access you can add the latest browscap from http://browsers.garykeith.com/downloads.asp
  21. Nice design Few remarks - Your markup contains 7 errors - Your CSS contains one error
  22. How does that put $friend_content = file_get_contents($friend_file); in the correct place?
  23. You can not access their geo-location using PHP nor can PHP access their mobile phones GPS system. Short answer: NO.
  24. This code does not work and you should know if you knew how PHP operated $postage = '<div id="regiondiv">0.00</div>'; $total += ($Price + $postage); Is the same as: $total += ($Price + 0); http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion More specifically
  25. Try: if(file_exists($target . $uploaddir)) { var_dump($target, $uploaddir, $_FILES['file']['name']); $target2 = $target . $uploaddir . "/" . $_FILES['file']['name']; } function findexts ($_FILES) { $filename = strtolower($_FILES) ; $exts = split("[/\\.]", $filename) ; $n = count($exts)-1; $exts = $exts[$n]; return $exts; } $ext = findexts ($_FILES['file']['tmp_name']) ; Is the same as $ext = pathinfo($_FILES['file']['tmp_name'], PATHINFO_EXTENSION);
×
×
  • 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.