Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. so I have an innodb type table and I need to perform 3 separate queries - an update, a query and another update depending on the last query. How do I wrap these queries up so that a lock is gained on a row and only released when the last query is complete?
  2. I have a process where I need to lock just one record of a table.  Locking the entire table would cripple the rest of the site simply due to the volume of request that use this table. I have read that the InnoDB type supports this but I am not sure how to execute the lock on a single record - do the updates and then release the lock. ANy help would be very much appreciated.
  3. I think you are referring to how this displays on the screen; i.e. you get Hello and then world on the next line. This is indeed a html issue - h1 and p tags are block level so they will clear to the next avilable line within the current element. If that is the html you are outputting then you will have to change the display properties of h1 and p in your style sheet to: h1 , p { display: inline; } That will put it on one line BUT you will not have a space between words...
  4. that is why you always check the info sent in your processing script!
  5. Excellent point pr0x - I forgot about that one!
  6. when posting forms all the fields (except unchecked radio buttons/checkboxes are set - even if they are null or empty. you best option is if (empty($ef) && empty($es)) ....
  7. ToonMariner

    span or div?

    euuuuuuuuuuuuuuuuchhhhh - not a very site to view in IE. FF lovely though ;) I see lots of divs in there so have we got crossed wires here...
  8. for compliance you shoudl use <INPUT disabled="disabled" name="fred" value="stone">
  9. Hi People, I need a bit of help with the old rewrite stuff. 1st a few questions as to how apache handles the rewrite rules. Is it valid to have multiple rewrite rules? Does it execute the first one that satisfies the regex or does it go through them all? OK here is my situation. I can code the php to handle all the url conversion - not a problem.  The issue here is I want the rewite to work only if the specified url is not a directory.  I have a admin dir that I do not want rewite to work on - this is where the cms is. The public side of my site is entirely driven from index.php SO every request that is not for a file in the admin directory should go there (apart from images, pdf's that sort of thing.) I have this for handling the requests for acual files     RewriteEngine on     RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php but fo course this will interfer with the request to '/admindir' and any subsequent requests. I figured something like     RewriteEngine on     RewriteRule /admindir(.*)? /admindir     RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php would be the order of the day but it didn't work. I would really appreciate any help on this guys 'n gals. PS. I am working on a development machine winXP apache 2.0.59. and I could not get this functioning through .htaccess - instead I had to place these settings directly into the <virtualhost> tags of teh httpd.conf file any ideas why that is so would be a real bonus (please note I don't really have a clue how to structure a real .htaccess file!!!!)
  10. Hi people, I am creating a site with friendly urls. I need to STOP redirection for all files in the /admin/ directory. This is what I have but it aint working....     RewriteEngine on     RewriteRule /admin/home.php(.*)? /admin/home.php$1     RewriteRule !\.(gif|jpg|png|css|pdf)$ /index.php so basically this should redirect all requests to index.php except those that contain /admin/home.php. This url could have any number of parameters passed to it and will also have to deal with post data. Would it be helpful if I place a htaccess file in the admin dir with engine off? Many thanks in advance.
  11. check open base dir is not set in the php.ini file
  12. use sha1 instead of md5 - its a bit stronger. also look at using mysql_real_escape_string to sanitize your input - you can alos use that to prevent mysql injection (and detect it and log the offenders ip address etc etc)
  13. make sure the line-height of the parent container is 1em;
  14. you can use the old border="0" attribute in the image tag BUT i prefer to do this.. <a href='the link' id="thislink"><span>SOME TEXT TO SHOW IF CSS IS OFF AND SCREEN READERS CAN SEE</span></a> in in the css a#thislink {display:block; width: 200px; height: 100px; background transparent url (images/urimage.gif) no-repeat 0 0} a#thislink span {display:none;}
  15. favicon is the thing you need to look for
  16. [quote]I can't have a tableless design... i need it to be graphical. Any other suggestions?[/quote] Why on earth would a tableless layout stop you having a 'graphical'  layout? I'll copy your code over in a minute and see if I can find the problem - will post back in a bit with your solution...
  17. you apply the vertical-allign property to the parent container. So in your case #file_name should have vertical_align: middle; This is a problem if you have other content you don't want to align in this manner...
  18. That colspan="2" might come into play some where!!! but MATE - the html!!! there is a closing html tag just after the form. Now I do not want to dive into this but you REALLY need to address this - get your structure sorted out - nest your code properly. This will REALLY help you identify problems. Dare I suggest a move to tableless layout? there is so much html in there that is JUST for styling! this will make your page incredible slow to load.
  19. ooops didn't read all your post. if all that is supposed to be one function you have terminated the curl_mail function after 6 lines of code. If not that then you must trace back each assignment of each var that makes up $ses.
  20. using define will make a constant which is available anywhere - so you don't need the $smarty-> once you have defined it you can access it anywhere. (good practice to use uppercase for constants - helps you identify them in your code)
  21. try initializing the $ses var befoer you use it. $ses = NULL; $num=rand(3,20); for($count=0;$count<$num;$count++) { $sesid[$count]=$letters[rand(0,35)]; $ses.=$sesid[$count]; }
  22. this is a job for a cron job or forking. php will only tim eout when running through a browser. there is decent tutorial on forking on this site - go read. [url=http://www.phpfreaks.com/tutorials/71/0.php]http://www.phpfreaks.com/tutorials/71/0.php[/url]
  23. you will also need to encrypt your email to maintain security otherwise its all a bit of a waste of time. easiest way is to form a string of all your data, encrypt it using the mcrypt set of functions and a key of your choice, email that string and then decrypt it at the other end.
  24. dead easy. place an empty div at the bottom of your left hand div. give it an id and in your css use clear both. ie. <div id="left"> load s of stuff <div class="clearright"></div> </div> div.clearright {clear: right;}
×
×
  • 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.