Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. ooops!! Well spotted that mam! Another reason why you shoudl always check the manual or at least doa function lokkup - NEVER trust you own memory! ;) PS ob_start (I feel is useful in creating large modular back-ends - I wouldn't use it on the front end though!!!!)
  2. On question 3.... If I have got this right.... You want to change the content of an element on a page with AJAX, and if ajax fails then you simpley use this if (urRequest.readyState == 4) {          // only if "OK"          if (urRequest.status == 200) {             document.getElementById('somediv').innerHTML = 'your stuff';          } else {             document.getElementById('somediv').innerHTML = '';          }       } Question 4. You have already done it!!! $output = ob_end_clean(); // or $output = ob_get_constants() - have a read on teh differences $output = str_replace($foo, $bar, $output); or you can perform some regex to it....
  3. You can make it as hard as you like but the only real way I see of protecting such imges is to water mark them.  This ruins teh picture of course as if you don't bang the watermark right across the image then others will just crop it off. Even if you did all the tricks in the book the image will still be cahced on the clint machine - so long as they know where to look then they have it....
  4. I personnally design in xhtml 1.0 strict. there is not much difference between html 4 and xhtml 1 - as far as I have seen (not done any reading on this though!) One thing I have found is that it makes IE use the box model properly (or at least I have yet to see my sites break in ie!) Its just my opinion but I love the professionlism that xhtml strict or html 4 strict brings to your code.  You HAVE to generate properly nested html and I like the idea that as a developer you have a framework to use and shoudl use it properly - after all if you right shoddy php with missing bits and bobs you get errors so why neglect something just because the odd browser is more forgiving.... The concept of forwards compatible sites is something we should all be aware of - there are stories of BIG sites having to chop/hack/bodge things to get them to work for the largest audience they can afford to reach - save your self time money and and whole volume of other problems in the future.... But thats just my take.
  5. Has anyone got a decent bunch of headers that allow the mail to get into teh inbox instead of junk /spam? Much appreciated if you have - oh and pass em on. Cheers people..
  6. easier???? Random 8 didgit number could be found in a couple minutes with a simple brute force attack! seems a lot of hassel where as umask and chmod would do the trick - provided what I said was possible - which I am sure it is.
  7. if someone gets the full url then they may still be able to see them! Without done the reading have a look at locking the directories and only opening them vis teh script - may be that chmod will be more than enough for your needs. No expert on this but you would need a setting that denies public but allows owner of the dir to access - that way php should be able to chmod the directory.
  8. <div id='detail_contact'> <h3>Contact Information</h3> <div> <div id='detail_contact_address'> <h4>Address</h4> Address Line 1<br />                         City, State Zip </div> <div id='detail_contact_phone'> <h4>Phone #</h4> 555-555-5555 </div> </div> </div> h3 { clear: both; } #detail_contact_address, #detail_contact_address { { float: left; width: 250px; }
  9. Not really as if you run that check each time the script runs flood will ALWAYS be greater than time now. You need to store the time the person last posted in the database, check it and if its greater than the current time MINUS the period you do not wish them to be able to post again then prohibit the post
  10. you are mixing js and php there buddy! PHP will stop running once the page has been served to the client - php can do no more after that until the next request is sent. you wil have to populate and array explicitly in js usign the php array you have constructed and then use id to traverse it.
  11. send a link or show us some html please
  12. Sounds like a register_globals issue... If in your code you simple check for $one == 1 change to $_GET['one'] == 1
  13. Yeah, 'or die(mysql_error));' change to 'or die(mysql_error());'
  14. Or just float the images - floated elements won't appear in your print out.
  15. No.. You run the query once but use the check buttons to formulate the string before you run it...... eg. [code] <?php $searchname = $_GET['sname']; $qry = "SELECT * FROM `people` WHERE `surname` LIKE '%" . $searchname . "%'"; if (isset($_GET['chksex']) { if ($_GET['chksex'] == 'male') {   $qry . = " AND `sex` = 'm'"; } else {   $qry . = " AND `sex` = 'f'"; } } $search = mysql_query($qry); ?> [/code] The above code would search for the name you entered and if you checked one (or both) the boxes for sex it would add the criteria to the query BEFORE the query is executed.
  16. create a separate style sheet and add the media="print" attribute.... only background images should be left out of your print. the hard copy of yoru site will rarely require to be printed out exactly as th site looks - while the site should have a professional look and feel, the job of a hard copy is very different - people just want to read the article the don't need all the headers and navigation menus etc etc
  17. The background image used has a width of 1024 in order to get this working on a smaller width you would have to break it up and set background of both the html and body element of create a wrapper for the whole page and set background of the body and the new rapper. Position them left and right accordingly and repeat-y. BUT as the width of teh content area is 700px you still won't see very much of it so you may as well not bother. ;)
  18. So how does all this help me grab the list of id's inserted? I coudl concievabley have 50 record sets inserted with one query!!!!
  19. Aye up cod head!!!! (that is if you from GY UK not GY Canada!) You may guess from my screen name that I am an exile in geordie land! Welcome to phpfreaks anyway matey....
  20. you could use the checkbox to form the query string. Using an if statement you could add... [code] $qry = "SELECT * FROM `table` WHERE `cala` LIKE '%".$term1."%'"; if ($_post['chkbx1'] === true) { $qry .= "AND `colb` = 'ur criteria'; } //.... and so on. ?> [/code]
  21. Forking... [url=http://www.phpfreaks.com/tutorials/71/0.php]http://www.phpfreaks.com/tutorials/71/0.php[/url]
  22. Thats your answer then.... There is some part of the code that has the javascript menu 'starting' at the right hand side of the body. There is an absolute shed load of html in there (sure you need that much to achieve something that looks like it should be quite simple).  Also various tags missing like <body> etc. Suggest you validate your html....
  23. $expemail = $_POST['email1']."@"; $expemail .= $_POST['email2']; will just use addslashes if you are having probs storing in the db.
  24. Hi Guys 'n Gals... Just a quicky hopefully. I run an insert query like so.. [code] INSERT INTO `image` ( `image_id` , `image_path` , `image_type` , `image_dimension` , `image_size` , `image_alt` , `image_title` , `image_caption` , `image_longdesc` ) VALUES ( NULL , 'xxx 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx' ), ( NULL , 'xxx 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx' ), ( NULL , 'xxx 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx' ) [/code] It matters not about 'xxx' at the moment.  What I wish to achieve is to grab all the id's that query creates. mysql_insert_id returns the last but I want a list of them all... Any help much appreciated.
  25. There are A LOT of errors in the html.... go here [url=http://validator.w3.org]http://validator.w3.org[/url] and fix them; that will be a huge step in solving your problems...
×
×
  • 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.