Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. By invalid HTML I mean http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.stackway.com%2F That only partially solves Sorry, that would be the contact form
  2. Your looking for JOIN http://dev.mysql.com/doc/refman/5.0/en/join.html This will join all table results together creating one table with all required information
  3. Well your first approach load the header.php file which lead to the title and meta information already sent to the browser. Your second approach is more dynamic but still does not allow you to modify title nor meta information. The only way for you to maintain the possibility for modification is to keep your html file from being sent to the browser you can for example create an object (DOMDocument, Smarty, ..) that will hold your entire website layout until you believe you are completly done and ready to sent it to the browser. This approach allows you to modify everything until it is sent to the browser. You can even cancel the processing and start a new one by redirecting the user to another section of your website.
  4. <?php session_start(); ?> <div id="header"> <div class="login"> <?php if (!empty($_POST['username']) && !empty($_POST['password'])) { $username = $_POST['username']; $password = $_POST['password']; $connect = mysql_connect('localhost', 'root', '') or trigger_error('Failed to establish a connection the database server using root@localhost'); mysql_select_db('database') or trigger_error('Failed to select database <database>'); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $query = mysql_query("SELECT * FROM users WHERE username = '$username' AND password = MD5('$password')"); $numrows = mysql_num_rows($query); if (0 !== $numrows) { $_SESSION['username'] = $username; echo '<a href="#" onclick="window.location.href = window.location">Refresh page</a>'; } else { echo "Incorrect username or password!"; } } else if (isset($_SESSION['username'])) { echo 'Welcome, ' . $_SESSION['username'] . '! <br /><a href='includes/logout.php'>Log out</a>'; } else { ?> <form action='login.php' method='POST'> Username: <input name='username' type='text' size="20" maxlength="25" /><br /> Password: <input name='password' type='password' size="20" maxlength="25" /><br /> <input type='submit' value='Login' " /> or <a href='member-register.php'>Register!</a> </form> <?php } ?> </div> </div>
  5. $baddebtFiles = glob('baddebt*'); $baddebtCount = sizeof($baddebtFiles); echo "next: baddebt-$baddebtCount.txt";
  6. You need .htaccess to translate /something/ to ?action=something unless you write /index.php/something
  7. - Instead of add webpage, -topic, -image reform it to a sentence so the intention becomes clear. I tried to go to about but all I got was that it's like a search engine and I can populate the website and add stuff to my personal stack (what is my personal stack? where is this stored?) - "Someone is posting innapropriate material?" .. or use the Contact Us form on the front page. Make this more user-friendly. - Form error handling is terrible. User gets redirected to a completly strange place with no option to return to the form. (Don't rely on the presence of back-button) Form is empty when I return.. Enough for me to say F*ck It! Remember: "Your competition is one click away" - If this is something popular introduce newcomers by using a featured tour or something - The user almost never knows where he is on your website (introduce breadcrumbs and other navigation aids) - Your search functionality changes across pages (users may mistake this and see it as an error) - Your HTML is invalid - Layout changes based on type selected try to keep some consistency among your pages - If a user clicks an item he can not get back - If a user then happens to return to your homepage he can't see what he already has visited or what is new since his last visit..
  8. The second method only works if rendering is done at the very last in your application. You could then for example create a head object that holds head information like meta, title, link, script, base, .. $head->setTitle('Title Here'); Or you could use something like Smarty but instead of using Smarty directly modify it your needs: $smarty->setTitle('Title Here'); $smarty->addMeta(..); $smarty->addScript(..); There are many ways you can go about it what also makes it so easy/hard to develop an application because you have so many possibilities and you can not just select just one without experiencing the (dis-)advantages of it first. My best advice would be experiment try things see what works for you. If something gives you trouble or something takes more work then actually should be required try to solve it in the most simplest manner.
  9. It's a common misconception to think Web 2.0 is about colors or a certain technology while it's neither. Web 2.0 is about a new generation of internet applications that share information. It's also referred to as the social web because it brought us Wikipedia, YouTube, Facebook, or this forum .. Web 1.0 if you want to call it like that was a version where only experts (those who knew about html and ftp stuff) could exchange information while now about anyone can share about anything. Web 3.0 will become the semantic web which means that all information will be clearly identified (see HTML 5) Once all information is properly tagged we can let the web do more. It will be able to give responses to complex questions sorted on your interests for example: "I want to see a funny movie and then eat at a good Mexican restaurant. What are my options?" (HowStuffWorks, http://www.howstuffworks.com/web-30.htm)
  10. They want students because they plan on spending little not because they want to give them chances in live.. In the end it's up to you if you want to spend working 20 days for only 599..
  11. Read this http://www.scanit.be/uploads/php-file-upload.pdf
  12. Something like this: ~ $baseUrl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']; $sql = "UPDATE session SET last_click_at = now(), last_click_url = '$baseUrl' WHERE .."; mysql_query($ql); That's what the session.gc_probability and session.gc_divisor are for. But pfmabismad already mentioned in another post that this is best not be done. You can however set session's to expire after a certain time and when using something like google analytics (or manually) you can track how long a user remains on your website and increase if necessary.
  13. Thank you your code should be: /* format of date display */ $fmt_ymd = "m.d.Y"; /* date page was last modified */ $file_last_modified = filemtime($_SERVER['SCRIPT_FILENAME']); /* display foooter */ $last_modified = date($fmt_ymd,$file_last_modified); echo(" Page Last Updated: $last_modified"); and /* format of date display */ $fmt_ymd = "m.d.Y"; /* date page was last modified */ $file_last_modified = filemtime($_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF']); /* display foooter */ $last_modified = date($fmt_ymd,$file_last_modified); echo(" Page Last Updated: $last_modified"); What does this now give you?
  14. 1) Create a db table: sessions 2) Store session data in the db table using session_set_save_handler 3) Set session.gc_probability 1, session.gc_divisor 1 (not recommended on heavy websites) 4) Perform a query counting all rows currently in the sessions table 5) Store additional data like username, last_click_url, last_click_at and display which user is on which page Things you can try with this setup: 6) Someone acting stupid? Provide a remote logoff functionality (change user to group banned, remove his session data from the db) 7) Detect when logging in to an already logged in account
  15. You surely won't need it. Do you think Google also won't need it?
  16. - I would have loved your design in 1998 - Your HTML contains errors - Your CSS contains errors Your websites usability is rather poor especially because your application is nothing more then a big library for users to search through and it shows there has been no effort to ease this process not even a focus on load nor is your search clearly visible. To increase your websites usability I therefor advice to put a much higher focus on your search, experiment with Ajax technology so users get suggestions as they type (name of the drug (in black, higher importance) plus some description (in grey)). Instead of suggestions you could also create a dynamic table that lists all matching drugs. In the future you may also add filter options, like: - target audience including healthcare professionals and medical students - pathology and eponymic, clinical signs, symptoms, surgical techniques These filtering options should provide your users with a good set of options to drill down to what they are looking for (for example when looking for a clinical sign that starts with a d so they don't get everything in your database that starts with a d but specifically to signs)
  17. You can put it anywhere and if you have php.ini access you can add the path to the Zend library directory to your include_path. Use set_include_path otherwise.
  18. Read my last post in your previous thread What do you think clients will do after reading this? Or after reading this? Typo: Portfolio Don't thank them show them immediatly what they are coming for. For example: http://www.rolfpiechura.com/ Highlights his current and previous works
  19. <h1><span class="website-title">Minihobbs <span class="tag-line">Portfolio of Matt Hobbs</span></span></h1> #header h1 .website-title { margin-left: -99999999px; } #header h1 { background-image: url(images/header.jpg); background-repeat: no-repeat; .. }
  20. How does multilingual relate to sports betting? How does what you want to do relate to Math? Are you going to wait till someone confirms before you put up your code so we can actually suggest something?
  21. I like where the design is going but I'm going to give you a few pointers: - Clients think they know what's currently hot. Because their monthly magazine told 'em. It's something that has flashy colors, images, and looks good that is what is called "Web 2.0" Like I said think they know.. - Get inside the mind of the client and play with that information for your own benefit - If you are using Photoshop chances are everything is still points-based which explains why all text is so large do this: Select view -> select the first item, a new flyout appears -> select monitor-rgb Select view -> show -> enable smart guides Select view -> enable rulers Select window -> extensions -> kuler (<- important otherwise visit kuler.adobe.com) Select edit -> preferences -> units & rulers -> rulers: pixels -> units: pixels If you create a new document: Select preset web -> size: 1024x768 -> resolution: 72 pix/inch -> color mode: rgb 8 bits Select view -> new guide -> orientation: vertical, 30px Select view -> new guide -> orientation: vertical, 990px (contained width 960px, ideal width for a 1024x768 screen) Select view -> new guide -> orientation: horziontal, 600px (fold) Create guides for all your elements. For example: banner (guide: orientation: horizontal, 88px), topmenu (guide: orientation: horizontal: 108px), ... and whitespace (<- important) Before creating a design you should first decide on which pages your website shall contain then create a wireframe (on a piece of paper) for each page. These wireframes will indicate where which elements will be placed. Once all wireframes are in place start creating your desings like indicated above. Keep everything within one PSD document layer every page within one directory. Great example: http://www.rolfpiechura.com/wp-content/uploads/2009/02/wireframe1.jpg (create one like this for each page)
  22. For a minute there I thought you couldn't laugh with my joke Something designers use to point out in a funny way how one's website looks no insult intended Lostprophet indeed said things he shouldn't have said
  23. Like already said without IP it's not possible and I think you are looking for this (detect ip-change) session_start(); ini_set('session.gc_maxlifetime', 1800); if (!isset($_SESSION['ip_address'])) { $_SESSION['ip_address'] = $_SERVER['REMOTE_ADDR']; } if ($_SESSION['ip_address'] !== $_SERVER['REMOTE_ADDR']) { echo 'ip changed.'; } You can use cookies aswell altough I prefer sessions.
×
×
  • 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.