Jump to content

jlhaslip

Members
  • Posts

    2,568
  • Joined

  • Last visited

Posts posted by jlhaslip

  1. Caching can also be avoided during a Development stage by using a Meta-tag with an already passed date. Google on "meta expires= tag" for more info, but here are two sample meta-tags which work:

    <meta http-equiv="expires" content="0"> <meta http-equiv="expires" content="Tue Dec 31 23:59:59 GMT 2002">

    Only one would be required.

  2. I hope that is a stutter right at the top of the first code-block.What sort of errors or faulty behaviour are you getting? Have you set the mysql error reporting on for this? Try putting some error checking code in place. Trap the values of the variables in an array and have the array printed at the error escape points, for instance. And every time you set the session variables.Also, I sense there is a fatal flaw in the code since you seem to be manipulating the $_POST['password'] throughout all program in spite of the presence of the $password variable into which you copy the $_POST['password'] right at the start of the code? Do you know what the value is at various stages of the program including when you set the session variables? Some Basic Debugging techniques are in order.Here is something to check, though.

    $db_pass['password'] = md5(stripslashes($db_pass['password']));$_SESSION['password'] = stripslashes($_SESSION['password']);

    In the second line, you are stripping the slashes from a password which I think is already hashed, whereas the retrieved db password is MD5'd AFTER the stripslashes. Possible you are getting a difference there. Store the values both (before and after) to compare the results. Might have to reverse the sequence of the hashing and stripslashes on the retrieved password.

    $db_pass['password'] = stripslashes(md5($db_pass['password']));	$_SESSION['password'] = stripslashes($_SESSION['password']);

    Like so.

  3. Okay, that's different than I first imagined the Topic to be about.Easy enough. Simply create "anchor" tags in the content of your page with "alt=" and "title=" attributes. That way, when someone "hovers" over the link, the tooltip pops ups. Biggest problem you will have is that there is a difference between Browsers for this technique. IE uses the "alt=" attribute and Other Browsers use the "title=" attribute, so you would need both in the anchor tag for Cross Browser compatability.A sample of the code is :

    <a href="http://www.php.net/manual/en/ref.session.php" alt="PHP.net: Sessions reference page. Opens in a new window." title="PHP.net: Sessions reference page. Opens in a new window." target="_blank">

    Another approach, for those items which you want a tooltip for, but no anchor, or for an extended length of message, is to define a hidden <span></span> for the various words and then have them identified by underlining or highlighted background colours. I happen to know where you can find out more about this technique. Tooltips TutorialIt appears complicated, but once you have the concept, it works pretty slick.

  4. That would work, too, if your hosting is enabled with php. And rename the files to file.php, or alter the .htaccess file to parse html as php.

  5. Probably because IE sux? As does using tables for lists. Try using ul's and li's. Then add margins and padding to space them. Easy.Also, the order of the .tab class selectors will be a problem. List them in the order of Link a , Visited a:visited, Hover a:hover , Active a:active, or they wont behave themselves as you expect them to. (lover=lvha)

  6. Go over to the w3schools tutorials and discover the use of unordered lists<ul>, list items<li>, and div's<div>. You will be better off dropping tables and Frames. My opinion.PM me for a copy of a bare page that will do everything you want and is validated.Oh, and missing a Document Type Declaration is an invitation for trouble. Cross-browser issues and Quirks mode comes to mind.

  7. originally written in September 2002
    anything newer? that's a long time ago in web years. Half a livetime for IE6, for instance. And 2 Firefoxes ago.
  8. Can I then validate the the source with the validator? Because then, of course, the data is spread over three files, does the validator recognize the including of the other files? Or do I have to include the other stuff manually first, then validate it and then spread it out again?
    No. There isn't a "php validation service", but if you submit a php file to the w3c validator, it validates the (x)html that is produced by the page as if it were simply an (x)html page without any php or includes. All the include function, and php in general, does is allow you to do things 'dynamically'. Meaning search databases and have conditional branching logic and stuff which (x)html does not allow. Essentially, you are using php to write the (x)html code to the client's browser and then using CSS to 'style' the presented material.Gets confusing sometimes trying to place the blame for errors.
  9. But What will I put on the Table Prefix?Thanks.. It seems your a good PHP Programmer would you suggest any other books to learn more about PHP what i mean the complete.. Yeah W3School helped me on PHP scripting but I need some reference to read when Im in school or not online... Thanks..
    You could use anything for the prefix, like "mydb" or "schwartz", just a text string to identify the tables for the application is required.Pick up a copy of : PHP and MYSQL for Dynamic Websites, by Larry Ullman, Author. I think it is Peachpit Press, or something.
  10. Try this:

    else  {	$result = mysql_query("SELECT * FROM user");	while($row = mysql_fetch_array($result))	{	  if($row['id']==$_COOKIE["user"])		{print_r($row);print_r($cookie);		  $username=$row['username'];		}	}	include("body.php");  }

    This should print the array values for debugging.*editted*changed the location of the print _r()'s

  11. ever read 'Alice in Wonderland'?"Begin at the beginning and when you get to the end, stop."I'd start by creating the html Template for the Index page layout and then break it down into components that could be 'included', but that just my approach. Others may have some ideas, too.

  12. And is the path to the image okay where you attempt to display it?Add an alt= tag to the html image tag to see if that might be the problem. Maybe the path you are using in the image tag is not correct?

  13. Store the labels as an array, then loop through the array, adding the selected=selected to the printed line if conditon is true for the comparison of the $_POST['subject'] value and the array element. Check to see if there is a value in the $_POST['subject'] before the comparison loop, or by using an isset(), and handle accordingly.

×
×
  • Create New...