Jump to content

BuildMyWeb

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by BuildMyWeb

  1. youve positioned all four elements in the same place absolutely, relative to their container. .notification { ... position: absolute; bottom: 0px; right: 21px; ... } i could help you if you explained what it is youre trying to achieve. otherwise im only guessing. but you could try soemthing more like this: <style type='text/css'> #container { position: absolute; bottom: 0px; right: 21px; } .notification { padding: 15px; margin-bottom: 20px; border: 1px solid #eed3d7; border-radius: 4px; float: right; display: block; } #alert-notification { color: white; background-color: #DA4453; } #success-notification { color: white; background-color: #37BC9B; } #information-notification { color: white; background-color: #4A89DC; } #error-notification { color: white; background-color: #DA4453; } </style> <div id='container'> <span class="notification" id="success-notification">Registration complete. Please check your mail.</span> <span class="notification" id="alert-notification">Account already activated.</span> <span class="notification" id="information-notification">Please check you email.</span> <span class="notification" id="error-notification">Wrong login detials.</span> </div>
  2. i would try min-device-width http://blog.templatemonster.com/2014/10/14/css-media-queries-for-all-devices-and-browsers-including-ie7-and-ie8/
  3. http://webcheatsheet.com/php/multidimensional_arrays.php
  4. first person to solve this gets an automatic, irrevocable entry into my VIP Holiday Card Master List. ive been tussling with it for hours over two days and cannot figure out what the problem is. site: http://104.152.168.18/~redtagsp/ you'll see five image buttons in the center of the homepage. red bg is for diagnostic only. the third of the smaller images in the top row is sitting slightly lower than the others. the containing element (transparent black) is floated as are all 5 images within it. and the text-div above the images. seems really simple but ive had these frigging elements bobbing all around and this is the best i can get them. my guess is there is some CSS outside of my own (this is a Wordpress site) that is screwing things up for me but i cant find it. here is the HTML for the containing element: <div id='home_buttons'> <div id='free_shipping'><strong>FREE</strong> Shipping on all orders over $40</div> <a href=''><img src='/~redtagsp/wp-content/themes/bmw_storefront_child/pics/buttons/button_blank_pucks.png' class='home_button_small'></a> <a href=''><img src='/~redtagsp/wp-content/themes/bmw_storefront_child/pics/buttons/button_custom_pucks.png' class='home_button_small'></a> <a href=''><img src='/~redtagsp/wp-content/themes/bmw_storefront_child/pics/buttons/button_custom_pucks.png' class='home_button_small'></a> <div style='float:left; clear:both; width:100%; height:5px;'></div> <a href='' class='link_button_large'><img src='/~redtagsp/wp-content/themes/bmw_storefront_child/pics/buttons/tape.png' class='home_button_large'></a> <a href='' class='link_button_large'><img src='/~redtagsp/wp-content/themes/bmw_storefront_child/pics/buttons/balls.png' class='home_button_large'></a> </div> here is the CSS directly associated with the above: #home_buttons { float:left; width:95.4%; padding:1%; margin:100px 1% 20px 1%; background:rgba(0, 1, 17, 0.75); border-radius:10px; } #free_shipping { float:left; width:100%; text-align:center; border-radius:5px; background:#555; color:#fff; margin-bottom:10px; } #home_buttons a { float:left !important; max-width:32.8%; margin:0 0.5% 0 0; padding:0px !important; background:red; clear:none !important; } .link_button_large { float:left !important; max-width:49% !important; margin:0px 2% 0px 0px; clear:none; } .link_button_large:last-of-type { margin:0px; } .home_button_small { float:left; max-width:100%; } .home_button_small:last-of-type { margin-right:0%; }
  5. yes cronix. ive read that it will always be exceedingly slow to use in this manner. and makes sense. hence why im looking for an alternative
  6. i need to count the number of image files on a remote server not in my network. ive come across a suggestion to use @getimagesize($img_url) the above works but is really slow. anyone able to suggest a better method?
  7. I'm teaching myself a bit of OOP in php. found that i could pass an object into the SESSION array if i serialize() the object and then unserialize() it where i need it in other page files. all seems to work well until it comes time for a user to logout from my application and attempt to destroy the session. at times, when they log back in, this serialized SESSION value seems to still be set while other SESSION values have been cleared. at least i *thinnk* this is what is going on. in my logout handler, i have the following: $_SESSION = array(); // clear all SESSION vars setcookie(); // clear cookies session_destroy(); but the above does not seem to be working. my guess is there is something native to serialized SESSION values that im not yet aware of. any help here would be much appreciated.
  8. i have: if( $stmt = $db_connect->prepare('UPDATE '.C_T_DRAGONS.' AS d, '.C_T_USERS.' AS u SET d.'.$prop.' = d.'.$prop.'+'.$val.', u.ap=u.ap-1 WHERE d.id = ? AND (SELECT u2.ap FROM '.C_T_USERS.' as u2 WHERE u2.id = ?) > 100') ) which echoes out as: UPDATE dragons AS d, users AS u SET d.claws_dam = d.claws_dam+1, u.ap=u.ap-1 WHERE d.id = ? AND (SELECT u2.ap FROM users as u2 WHERE u2.id = ?) > 100 and am getting the following response: Error : (1093) Table 'd' is specified twice, both as a target for 'UPDATE' and as a separate source for data will this have to be done in 2 queries? did a little searching and im thinking maybe the subquery is being refused?
  9. dammit. passing the wrong object. thanks Psycho.
  10. function chk_error($site_mode, $obj) { if( $site_mode == 'dev' ) { echo'Error : ('. $obj->errno .') '. $obj->error; } } chk_error($site_mode, $stmt); the above is not working for me. it echos out the text but no values for errno and error. what am i doing wrong?
  11. thanks Cronix. for anyone who might find this useful, here is my query syntax: $query_ap = 'UPDATE ' . C_T_USERS . ' SET ap = IF(ap+8 >= 100, 100, ap+ WHERE status = "active" AND ap < 101';
  12. Im having a hard time even explaining this so a search was not fruitful. I have an INT column in a mysql table. i want to UPDATE it in increments of 10 but the value should never exceed 100. what is an efficient way to do this? ie. if the current value in the field is 96, when it tried to update field = field+10 , it should dynamically only be field = field+4 so that we do not exceed the 100 mark.
  13. i have a table of say 100 entries. i want to delete all but the 10 newest of those rows with a prepared statement. im fairly new with prepared statements so the syntax with a subquery is throwing me a bit. $stmt = $db_connect->prepare('DELETE FROM table WHERE owner=? AND owner NOT IN (SELECT owner FROM table ORDER BY dob DESC LIMIT 10)'); $stmt->bind_param('i', 0); $stmt->execute(); $stmt->close();
  14. thanks skunk for the help. turns out, i did eventually get a good query going. the RETS db was returning 0 results because we were doing a query on ResidentialProperty and this broker only had commercial and rental listings at the time.
  15. you have to validate that the $_POST['message'] field has what you want. i have the script exit() if there is an empty message value (nothing or zero) but you likely want to handle it better than this. <?php if(!$_POST) exit; $email = $_POST['email']; $message = $email = $_POST['message']; if( empty($message) ) { exit('You need to provide a message!'); } //$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'INVALID EMAIL ADDRESS'; if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){ $error.="Invalid email address entered"; $errors=1; } if($errors==1) echo $error; else{ $values = array ('name','email','message'); $required = array('name','email','message'); $your_email = "jhondoe@yahoo.com"; $email_subject = "Allstate new message: ".$_POST['subject']; $email_content = "new message:\n"; foreach($values as $key => $value){ if(in_array($value,$required)){ if ($key != 'subject' ) { if( empty($_POST[$value]) ) { echo 'PLEASE FILL IN REQUIRED FIELDS'; exit; } } $email_content .= $value.': '.$_POST[$value]."\n"; } } if(@mail($your_email,$email_subject,$email_content)) { echo 'Message sent!'; } else { echo 'ERROR!'; } } ?>
  16. i cant understand what youre trying to do here. but if you want to calculate an avg with php, why not something simple like array_sum($values) / count($values)
  17. thanks skunk. the provider isnt familiar with PHRETS and, though pleasant, hasnt been much help yet. im trying on a couple of other communities and contacted the developer directly. will post here if i get a solution.
  18. i had stripped the query statement down to the following. still no results: $search = $rets->SearchQuery ( 'Property', // Resource //6, // Class 'ResidentialProperty', // Class //'((Lud='.$sixmonths.'+),(Status=A))', // DMQL, with SystemNames '(Status=A)' // DMQL, with SystemNames //'(Status=A)', // DMQL, with SystemNames //array( //'Format' => 'COMPACT-DECODED', //'Select' => 'sysid,49,112,175,9,2302,2304', //'Count' => 1, //'Limit' => 20 //) );
  19. thank you skunk. ive had success with the following method calls: $types = $rets->GetMetadataTypes(); $fields = $rets->GetMetadataTable("Property", 'ResidentialProperty'); $values = $rets->GetLookupValues('Property', 'Status'); so ive got some good info. just cant seem to put it to good use in getting search results. i assumed it was my queries being faulty because i know there are indeed data values. im just not accessing it for some reason.
  20. i am using PHRETS ( http://dangodesign.net/2013/01/getting-started-with-rets-for-php/ ) to pull data off of a MLS RETS server. i am successfully connecting to the server so the conditional is passing. but my queries are pulling no results. the provider tells me DMQL2 is the database. ive only ever worked with MySQL so im in the dark. if($connect) { $sixmonths = date('Y-m-d\TH:i:s', time()-15778800); // get listings updated within last 6 months /* Search RETS server */ $search = $rets->SearchQuery ( 'Property', // Resource //6, // Class 'ResidentialProperty', '((Lud='.$sixmonths.'+),(Status=A))', // DMQL, with SystemNames array( 'Format' => 'COMPACT-DECODED', 'Select' => 'sysid,49,112,175,9,2302,2304', 'Count' => 1, 'Limit' => 20 ) ); /* If search returned results */ if($rets->TotalRecordsFound() > 0) { while($data = $rets->FetchRow($search)) { print_r($data); } } else { echo '0 Records Found'; } $rets->FreeResult($search); }
  21. children inherit opacity from their predecessors. rather than using opacity on the parent element, try rgba: http://www.css3.info/preview/rgba/ otherwise you can position the overlay from outside the original element
×
×
  • 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.