Jump to content

joshbedo

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

joshbedo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Where is your closing bracket for your while loop and where is your opening bracket for your if statement
  2. I was wondering if anyone has seen a tutorial on making a full width image cycler. I remember seeing it on a website before and thought it was cool but now im trying to figure it out and i cant think of how to do it. Has anyone see this before? I have some code semi working and scrolls full width but the image sets at 0px left.
  3. figured out what wasnt let me validate it was the character encoding i used a tidy html tool on a site and it changed my website encoding. now im just having problems with
  4. I have been trying to clean up code on this website i just built and downloaded a firefox plugin to check for validation easier and see what line something is giving an error. I just cleaned up alot and only have 19 errors and now i try to test it on the W3C website and get i checked out line 142 and i dont see anything wrong with it. heres the link http://www.eriesd.org/central/central2
  5. Im messing around and attempting to build a small MVC im stuck a little on the model class what i want to do is call an object with a function which connects to a database and converts the array to variables like this. public function getArticle($text) { $this->addConnection('localhost', 'imstill', hash('passwordhash'), 'imstill_school'); $latest = mysql_query("select * from article order by id desc"); while ($latest_articles = mysql_fetch_array($latest)){ if(is_array($latest_articles)) { foreach($latest_articles as $key => $value) $$key = stripslashes($value); } // if statement above runs through the array of articles being fetched from the database // and then adds stripslashes and assigns key value // makes it so i dont have to add .$latest_articles[value]. everytime can just add .$value. //echo $postedby; echo $text; } } then at the bottom of function have the variable which is passed into the function which would be html and variables <?php echo $registry->getObject("model")->getArticle('<div class="section"><h2>$name</h2><span class="meta">$date</span>');?> it echos all of the html but it doesnt get the values of the variable is there anyway to do this? by the way im using the registry pattern to call model classes.
  6. try this <a href=pictures1.php?user_id=" ' . $row['user_id'] . '">' . $row['name'] . '</a>'; if your echoing that line otherwise, and i think its better practice <a href=pictures1.php?user_id="<?php echo $row['user_id']; ?>"><?php echo $row['name']; ? ></a>
  7. Do you just need a backup? If so I would lookup sql backup routine. My brother does this every night on another hard drive so if anything happens to a server.
  8. I'm pretty sure it has something to do with securevar I'm guessing your include has the wrong path I would try setting a variable in your included file and see if you can echo the variable before you have the securevar function.
  9. I just moved a site i was working on to a different domain and have tried changing the rewritebase to RewriteBase /central/central2 and to just /central/ but it wont work its not rewriting heres whole .htaccess Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase /central RewriteRule ^sports/([0-9]+)/option/([0-9]+)?$ page.php?loc=$1&option=$2 [QSA] RewriteRule ^careers/([0-9]+)/option/([0-9]+)?$ career.php?loc=$1&option=$2 [QSA] RewriteRule ^article/([0-9]+)?$ article.php?id=$1 [QSA] heres url http://www.eriesd.org/central/central2/
  10. Thanks, if anyone sees anymore bugs let me know. What version of IE are you using? I noticed that when i uploaded it through filezilla it made all of code together in one line so i have to format it and check it out. Im guessing your right though. Thats the only time ive noticed filezilla concatenating everything
  11. I just started launching a new website i coded for my school and im noticing in IE that sometimes in the sports section nothing loads. I was wondering if anyone had the same problem. I noticed the problem on a school computer but it loads fine on my computer. I'm using ajax to load a php file that gets the contents of another php file that connects to my mysql database and grabs information about the career and tech lab or sport. www.imstillreallybored.com/newstuff by the way their are alot of images that dont load so please dont comment. When i was transfering the files it messed up alot of relative paths that i had set so i have to fix alot of them.
  12. hey i was messing around with your idea and started building a class i was wondering if you knew how i could check if current time is greater than or equal to the cached time plus so many minutes <?php session_start(); class cache{ private $page; public $time; public $currentTime; public function cachePage($pagename, $time) { $_SESSION['cache'] = array( $pagename => array( 'html' => $pagename. '.html', 'time' => $time ) ); } public function getCurrentTime() { $this->currentTime = date("H:i:s"); } public function destroy() { if(isset($_SESSION['cache'])) { unset($_SESSION['cache']); } } } //end of class $cache = new cache; if(!isset($_SESSION['cache'])) { //$cache->getTime(); $cache->time = date("H:i:s"); $cache->cachePage('index', $cache->time); } if(isset($_SESSION['cache'])) { $cache->currentTime = date("H:i:s"); //heres where i need help if(strtotime($cache->currentTime) >= strtotime("3+ minutes", $cache->time)) { $cache->destroy(); $cache->time = date("H:i:s"); $cache->cachePage('index', $cache->time); } } print_r($_SESSION['cache']); echo strtotime($cache->currentTime). '<br/>'; //echo strtotime("3+ minutes", $cache->time); //$cache->destroy(); //echo $cache->time; ?> ?> was trying to use strtotime("3+ minutes", $this->time) in the if statement but it still wasnt working maybe it was the way i was doing it?
  13. putting 80% in the width changes the size through html which is a very bad idea first of all it actually takes longer to render an image then if it was just that size already without width styling. second of all it won't work on all images if you had an image of a person it would make them look 100 pounds more then they already are.
×
×
  • 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.