Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

About theverychap

  • Birthday 06/08/1976

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Devon, England

theverychap's Achievements


Newbie (1/5)



  1. I specifically added array and object ways, i didn't know what was in $result. Anyhow, after re-reading the question: "This way one variable holds two values - username and id. How can i assign those values to two different variables?" It would be helpful to see what is returned into $result. Maybe look at list if you want to assign values to different variables.
  2. If i understand correctly, you want the ball to resize too? http://jsfiddle.net/BG8F9/ I added a percentage width to the ball, it will scale with any resizing.
  3. Does pricedata.VechicleName (int) contain vehicles.TableID? if so, something like SELECT pd.yourfields FROM pricedata pd LEFT JOIN vehicles v ON pd.VechicleName = v.TableID WHERE yourwhereclause... may get you on the right track.
  4. I had to create rewrite rules involving hashes recently, i made notes here: http://tizardsbriefcase.com/625/apache/apache-rewriterule-rewrite-url-to-hash
  5. Your foreach is wrong. <?php $query_members = "SELECT username, id FROM members LIMIT 10"; $result = $db->run($query_members); // if $result comes back as an array... foreach ($result as $user) { echo 'username: ' .$user['name'] .'<br/>'; echo 'id: ' .$user['id'] .'<br/>'; } // ...or as an object foreach ($result as $user) { echo 'username: ' .$user->name .'<br/>'; echo 'id: ' .$user->id .'<br/>'; } ?> Hope that helps.
  6. How are you currently getting classes that are inactive / active - is it just a switch (on|off, 0|1 etc?). You'll need to added a "publish_date" or "activate_date" column to the table your store your data in. (Or create a table and join the two together). When creating a class, add in the publish_date to each entry. Then when pulling data from the database, make sure that the publish_date is > NOW(). Hopefully a good starting point, it's more simple than you may first imagine.
  7. Indeed, its valid, but older browser compatibility might be a slight issue you'll need to offer alternatives / workarounds.
  8. is the JS in your PHP page? or is it in a seperate JS file? If it's in your PHP page, you could of course use: $("#autoRefreshBattingDisplay").load('borders/right.php?gameNo=<?php echo $var; ?>');
  9. Maybe take a look at tableDnD - a jQuery plugin - does exactly what you are after! And very easy to use too
  10. Seeing as you are using eregi - you do not need to test for lowercase AND uppercase - the i in eregi is case insensetive, and so will pick up all cases... However, eregi is depreceated, so maybe you should use preg_match, or even stristr would do: if ( stristr($_SERVER['HTTP_USER_AGENT'], 'safari') ) { header('location: http://...'); exit; }
  11. Change: The reason you are getting "Please enter some text" is: You have two elements in your code with the ID of "content". So your javascript is trying to get the val() of the DIV, not the TEXTAREA. --- To stop the page flying to the top when people press "like": <a href="#" class="like" id="<?php echo $clip_id; ?>" name="down"> to: <a href="javascript:void(0);return false;" class="like" id="<?php echo $clip_id; ?>" name="down"> Hope thats helped
  12. You should test for the $_GET'ed ID and also a $_POST['Save'], if bothg of these exist, you know which textarea to "hide" - maybe a style="display:none;" or something?
  13. Set the datatype of the table colum to BLOB - you will then be able to store whatever you like Also, CKEditor is a fantastic editor!
  14. I can't see the problem (or do not fully understand it?) - I pasted your code into a file and loaded it using my browsers (Opera, Safari, Firefox & Chrome on the Mac) and could scroll as i assume is expected, with a static header and footer at the top and bottom...
  • 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.