Jump to content

swamp

Members
  • Posts

    87
  • Joined

  • Last visited

    Never

Everything posted by swamp

  1. You'd need to do it in JavaScript - I'd recommend loading in the contents with AJAX. If you were using the jquery library you could do something like //set cursor as wait with css $('body').css('cursor', 'wait'); //load results into div $('#info').load('results.php', function(){ //load has completed $('body').css('cursor', 'auto'); }); More info: http://api.jquery.com/load/ + http://api.jquery.com/css/
  2. You cannot access the iframe location after you have navigated away from it due to browser security restrictions
  3. Hi guys, I've got this array: Array ( [0] => Array ( [block_id] => 1 [template_file] => textpanel.php ) [1] => Array ( [block_id] => 2 [template_file] => textpanel.php ) ) I'm struggling to get to template_file from a foreach loop I have this: $data = $resultset->fetchAll(); foreach ($data as $item){ echo $item->template_file } Any help is much appreciated, I think I'm just missing something in between $item-> and template_file but not sure what. Thanks
  4. Ah - was incrementing just started $i as 0 instead of 1... Cheers
  5. Yeah there is more to my script, my only concern is how to get $i into $_SESSION['item'$i]
  6. Hi I'm having a bit of trouble with this: In my loop I need to add the $i to the session name (eg) $i = 0; while ($i < 7) { doFunction($_SESSION["item".$i]) }
  7. You could get the firebug extension for firefox and see the response you get from the page under the net tab
  8. Hi there, I need to check if there has been a url submitted from a form so if a post was "hi there, check out this website http://www.somewebsite.com/ - what do you think?" when it was sent to the script it would do something like if $_POST['comment'] has url in it then do function urlExists($url)
  9. Hi there, Could anyone give me a hand with this? I need to extract an image from a remote URL (Just the first image on the site).. so if $url = 'http://www.bbc.co.uk' it would grab the first image it finds on the site. Cheers
  10. And this site is good too http://www.sqlzoo.net/
  11. http://www.addedbytes.com/download/mysql-cheat-sheet-v1/png/
  12. Hi, I've got a DATETIME column in my database ($dateExpires) I need to be able to add minuets to this (something like this..) $dateExpires = $row['date_expires']; //2009-07-01 11:03:00 $minsToAdd = 2 (mins); $newDateExpires = $dateExpires + $minsToAdd;
  13. Hi there Can anyone shed some light on this? I need to have a countdown on a page that runs from a value in a database and then displays a different message. Something like <?php if($row['time_left'] < 0) { echo 'no time left'; } ?> But how would I have it automatically count down? Thanks in advanced.
  14. swamp

    Loop

    Can someone help me with this loop? Its just printing out the first item 10 times instead of looping through. Thanks $res =& $db->query('SELECT id, title FROM table'); $res->fetchInto($row, DB_FETCHMODE_ASSOC); for ($i=0; $i < 10; $i++) { ?> <p><a href="/page/?item=<?php echo $row['id']; ?>"><?php echo $row['title']; ?></a></p> <?php } ?>
  15. Thanks for your help guys, I realise that it isn't the right way to do this but it is what I've been supplied with! Cheers!
  16. Hi there, I have dates in this format in my database: dd.mm.yy So today would be 24.02.09 I know this may not be the correct way of entering them but they have been transfered like this and there are 6000+ entries. How could I order them by date descending and leave them in the current format? Thanks in advance!
  17. ... I know the logic of it, I'm just not sure about the code, any hints on how to do that?
  18. Hi, I need to write to a txt file but leave the last line intact. I'm using fwrite($handle, $content) but I need to keep the last line in my txt file which is "--Document End--" For example if I write "new line of text" to "test.txt" I need it to show up as (old content) new line of text --Document End-- Any hints? Thanks
  19. I've built a site on a server and now I'm switching over to a new host but a few bits don't work and I'm pretty sure its to do with the ini settings... It all works fine on the old server so I want to use the same config as that for the new server.
  20. Is there anyway of extracting all the data from phpinfo(); to the same format needed for a php.ini file?
  21. Yeah Cheers! Thx alot. Solved.
×
×
  • 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.