Jump to content

cssfreakie

Staff Alumni
  • Posts

    1,674
  • Joined

  • Last visited

Everything posted by cssfreakie

  1. is this maybe something you could use? <?php echo basename('/direct1/showtable.php'); //basename() ftw :-) ?>
  2. yeah that would be nice indeed. not sure if there will be such a thing though Maybe sent an email to the css workgroup but than again. it will take ages for it to be implemented if it will. maybe it's possible with html5, haven't looked at it yet. But that's be aimed for really dynamic stuff.
  3. no problem! Don't forget to mark the topic solved we love the green color of it out here
  4. nope it won't screw up the centering. you gave it a margin: 0 auto; But what i would do is make that image an even number for instance 990 or 992 since pixels can't be split in to two. (always work with even numbers when using pixels
  5. ah i see, well what you could do is set a padding to that container so the content stays in the same place but the background can grow a bit. since you have a container of 960px and an image of 991px; you can try to give it a padding of 15px left and right. You miss 1 px though It's always better to work with even numbers it could look like this: #container { background: url("../images/structure/yorkshire-media-background-image.jpg") no-repeat scroll left top transparent; height: auto !important; margin-left: auto; margin-right: auto; min-height: 500px; overflow: visible; padding: 0 15px; /* added this */ position: relative; top: 10px; width: 960px; } is that what you want or is it another scenario?
  6. if you have a background image it's the property of the container. (for instance a div with a background) What exactly are you trying to achieve?
  7. welcome m8! good to have experience here like yours
  8. okay, so the first response i gave, have a look at the database handling tutorial is what you need. It learns you how to fetch stuff from your database and put it in the form of an array. If that is not the case i have no idea. incase you found the previous link complicated: http://www.phpfreaks.com/tutorials here is a direct one: http://www.phpfreaks.com/tutorial/php-basic-database-handling
  9. I have no idea what you mean. Can you maybe tells us in a more precise/descriptive manner what you want to achieve (so what do you want the outcome to look like).
  10. you might want to have a read on the database handling tutorial on this site: http://www.phpfreaks.com/tutorials when you connect to a database an fetch the result, the result is given in the form of an array. So in other words, ones you created a table in a database where you store numbers you can fetch them in the form of an array. And by using insert or update you can increase or edit the numbers of rows stored in that database. HAve a look it's fun. If you never ran a database have a look into WAMP (windows) or MAMP if your a a mac user.
  11. I can really recommend a little booklet by Chriss Shiflett. http://www.amazon.com/Essential-PHP-Security-ebook/dp/B0026OR358/ref=sr_1_6?ie=UTF8&qid=1303986860&sr=8-6 It's a book abut php and security. worth the read!
  12. hehe no problem, I thought i let you know, because most people stop reading after they see such a post. anyway cheers for sharing your script. I assume (from the looks of it) it was working already?
  13. is there a specific reason you center aligned the text and did not use code tags? [code]
  14. uhm <input type="checkbox" name="agree" value="Yes"> is your html so the value is not yes but Yes. That's why I said this assume the value is yes. because i wasn't very eager to download the file so i hoped you spotted that yourself. So give the code i already gave a value of Yes instead of yes and than it should work fine. like: <?php // Checking the Checkbox if (isset ($_POST['agree']) && $_POST['agree'] == 'Yes') { // changed yes into Yes //so if $_POST['agree'] is set and has a value of Yes echo "congrats the value of \$_POST['agree'] = Yes"; echo $_POST['agree']; }else{ //so in any other case header("Location:memberAppMishe1.php"); // you need to agree bla bla bla exit; //remove this exit if the header redirect is incorrect in this ELSE statement } ?> also note that i placed that header redirect in the else statement, if that is meant for the case someone did fil in agree with Yes place that code after the if clause. like so: <?php // Checking the Checkbox if (isset ($_POST['agree']) && $_POST['agree'] == 'Yes') { // changed yes into Yes //so if $_POST['agree'] is set and has a value of Yes header("Location:memberAppMishe1.php"); exit; }else{ //so in any other case // you can't echo something here since it's above your <body> but you can set a value to show up. like: $errormessage = 'you need to agree bla bla bla'; // and echo this variable inside your body tag. } ?>
  15. woO nice cheers for sharing!
  16. it's called a sticky footer. tutorial and example can be found here. http://ryanfait.com/sticky-footer/ it will take you some time to understand and apply it. So first play with it on a clean page so you can isolate problems and serve to the point code if you need help after you read it all.
  17. Hi Fugix, Most sub-menu's are unordered lists (<ul>) inside of another unordered list. In a nutshell the sub in a normal state is placed outside the view of the screen by using indent or margin or set to display none; (so you don't see it) Now on hover state, it's than set back to display:block; or set to it's normal position depending on the technique used. (so you see it) example on what happens on the menu here at phpfreaks.com: active state (normal state) .dropmenu li ul { /* notice the ul inside the li declaration */ background: url("../images/theme/menu_gfx.png") no-repeat scroll 0 -130px transparent; border-bottom: 1px solid #999999; display: none; font-weight: normal; padding: 7px 0 0; position: absolute; width: 19.2em; z-index: 90; } hover state .dropmenu li:hover ul { display: block; } index.css?rc5 (line 1215) .dropmenu li ul { background: url("../images/theme/menu_gfx.png") no-repeat scroll 0 -130px transparent; border-bottom: 1px solid #999999; /* display: none; this one gets overwritten*/ font-weight: normal; padding: 7px 0 0; position: absolute; width: 19.2em; z-index: 90; } as far as the image used that's just a nicely positioned sprite image which you can see in the source above. small tip. get firefox and install firebug, that allows you to inspect the source code in a nice way and allows you to adjust it in real time. video on my blog if you have no idea how to use it.
  18. Okay have a look at the code below. The code below assumes that ones someone presses agree the value is 'yes' Hope this makes it more clear. <?php // Checking the Checkbox if (isset ($_POST['agree']) && $_POST['agree'] == 'yes') { //so if $_POST['agree'] is set and has a value of yes echo "congrats the value of \$_POST['agree'] = yes"; echo $_POST['agree']; }else{ //so in any other case header("Location:memberAppMishe1.php"); // you need to agree bla bla bla exit; } ?>
  19. I don't see anything here that could cause a big white space above your table. But than again I am not sure what you have in your stylesheet what may very well say table{margin-top:600px;} or something. Do you maybe have it somewhere online so i can have a look. I think this is more a html css question than a php one. Also your using some bad tags (see my signature for a reference on that) and your pretty inconsistent with the use of <br> and <BR> have you tried to run the output of your page through a w3c validator also?
  20. I just puzzled a bit and this is what i came up with. Not sure if it is the cleanest way, but it works. Love to hear a better way though Note though this assumes you first fetch data, and let php do the puzzling <?php $myarray = array( 42,42,42,60,60,60,60,60,60,60,50,50,50,40,40,50 ); sort($myarray); // added this to sort unsorted arrays $i = 0; foreach($myarray as $key => $value){ if ($key !== 0){$num = $key - 1;}else{$num=0;} //mainly for the first array element if($i <= 2 && $myarray[$num] == $value){ // if previous value is the same as the current echo $value.'<br />'; $i++; }else{ echo '<hr>'.$value.'<br />'; $i = 1; } } ?> p.s. what wine and some cheese can come up with edit: remove some redundant code edit2: added a sorting thingy
  21. well, not willing to learn or showing effort means your topic belongs in the freelance forum. for now this could be something to have a look in, but please if your not willing to put time in it yourself, post this in the freelance forum. //simple check if the value is as you want by using an if-clause if($_POST['agreecheck'] == 'yes'){ //so if the post value is equal to 'yes' //perform an action; echo 'value is yes'; }else{ //if value is not equal to yes, do something echo 'value is not yes, you need to agree blabla bla'; } more info here: http://www.tizag.com/phpT/ifelse.php if you do all examples there you should know what to do, if not post the code here in code tags and show what you tried.
  22. buy a decent book. online tutorials and articles are very limited and mostly meant for a specific case and assume a certain knowledge. a book is also more structured, more didactic and saves you time searching.
  23. have a look here: http://www.alistapart.com/articles/goingtoprint/
  24. had some time left, so here is an example of a div with an image in it, and a caption. by the way i saw you were using tables. (that's not what they are meant for) try this out and play with it. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link type="text/css" rel="stylesheet" href="css/style.css" /> <title>caption</title> <style type="text/css"> .caption { position:relative; width:150px; height:150px; overflow:hidden; border:3px solid #333; z-index: 1; } .caption img { position:absolute; top:0; left:0; z-index: 0; } .caption p { line-height: 150px; /* this is the eact same height of the div,making it vertical aligned */ margin: 0; /* if you use a reset.css this is not needed */ padding: 0; /* idem */ position: relative; text-align: center; color:#fff; font-weight: bold; } </style> </head> <body> <div class="caption"> <img src="http://i54.tinypic.com/fvy3kp.jpg" alt="" /> <p class="text">your caption</p> </div> </body> </html> you can of course add a float to the container div so you can let multiple image float next to each other.
×
×
  • 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.