Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. this look smore like a prime candidate for an xml file you can at the very least use the same methods for managing this file have a look at simplexml if you are using php 5 or DOMxml for php4...
  2. echo number_format (($number1 / $number2) * 100, 2, '.', ','); the fact it is showing 5,261.00 suggest all is working well - ist just that you number is 100 times bigger than you expect - doube check you math I suspect you actually want this <?php echo $row_rsProd['P_Retail_Price']; ?></strong></td> <td width="22%"><span class="style1">You Pay £<?php //Rob Farrell and Leyon Nevett: add up design cost x hrs $english_format_number = number_format($number); $number1 = $row_rsProd['P_Retail_Price']; if (isset($_SESSION['MM_Username'])) { $number = $number1 * $row_rsUser['Percent']; }else{ $number = $number1; } echo number_format ($number, 2, '.',','); ?> if $row_rsUser['Percent']; is anactual percentage (like 80%) then you will have to convert that to a decimal first.
  3. you can't stop them clicking twice - if they click refresh the same will happen and you won't be able to disable that. Once a new request is sent then the old one is 'deleted' so I woudl not worry too much about it.
  4. its ok bubblegum did the trick!
  5. Short tags should be banned - they are a relic of yester year and intefer with other stuff you may wish to do in php - such as xml files... DON'T USE THEM
  6. http://www.codewalkers.com/c/a/Miscellaneous/Sending-SMS-Thru-HTTP/
  7. you can check if it is available using function_exists('func name') - if that returns false then you know it can't be used. Functions are not 'disbaled' they can be called and some logic used to skip bits of what they do or they don't exist in the current script...
  8. if this is for headings then you should use the h1 tag - there is a css property 'counter-increment' that can do all this for you - use it with content and you shoudl be able to achieve your goals (not having used this for a while and knowing how prro the support was back then - I suspect that little has changed but you can but try. The alternative is, I'm afraid, manual or javascript.)
  9. Kumar - I encourage you to not rely on javascript to validate your form input.... by allmeans put it in as an added bonus but ALWAYS validate your user interaction serverside.
  10. Morning - forgot how to do this!!! I have two tables 'users' and 'friends' friends hsa 2 fields userid and friendid when some requests to be a friend a row is inserted into friends with their id in the 'userid' field and the person they wish to be friends with in the friendid field. When the request is accepted another row is entered with the ids swapped round. What I need to do is select the userdetails of users who are in 'userid' and my id is in the friend column BUT there is no record with my id in the userid column and their id in the friendid. This is what I have so far... SELECT `users`.* FROM `users`, `friends` AS `f1` LEFT JOIN `friends` AS `f2` ON (`f2`.`userid` = `f1`.`friendid`) WHERE `f1`.`friendid` = " . $_SESSION['userID'] this simply selects all the rows where friendid is my id... any help greatfully appreciated
  11. ok have a load of checkboxes ALL called 'chkbx[]' and set their value to the record id. (you can call em what you like but the [] are essential. - maybe del[] would be better) so when you submit the form with all these check boxes you will create an array called del... here is the php/mysql that will delete all those rows... <?php $delarr = implode(',',$_POST['del']); $qry = "DELETE FROM `atable` WHERE `record_id` IN (" . $delaar . ")"; $qry = mysql_query($qry); ?> dead easy!!!!!
  12. does forme... on win xp. ff 2.0.0.3
  13. $_FILES['inputname']['type'] wiil give you the mime type of the uploaded file.
  14. without any code or some idea of what settings are different on the new server then we are a little blindfoded in this one.
  15. depneds on how your server is configuered - some simply apply the certificate to any file when you plae the https in the link others have a directory that the certificate is applied to - in that case you nned to place your scripts within that directory....
  16. ??? why do you need that just to allow users to upload a file? if you are storing the file in a database then you store in a blob field - there are plenty of examples such as this http://www.phpbuilder.com/columns/florian19991014.php3 to do just that. otherwise just upload the file to a directory.
  17. give elements a width and set their left and right margins to auto.
  18. you can only add javascript to the events on a html element. PHP executes on teh server and is all done and finished by the time the client displays a page. If you want the button to do something dynamic then you will have to use ajax.
  19. Do you have a certificate installed on the site? If you need data collecting securely you should have the form and processing script in the https: domain so simply link to the form with the good old <a href="https://<?php echo $_SERVER['SERVER_NAME']; ?>/path/to/form">Form</a>... I don't think you should pass info from http: to https:
  20. Food for thought. I shall investigate further... The reason I asked in the first place is that we have information portal that is used by serval different organisations... Each location has mulitple users from their internal network. What happened was one person plugged their own laptop on the avialable connections and was browsing through a part of the site - it was not a section that required secuirty but we do record traffic based on location and his ipaddress was not recognized as being from that centre; the recording of some of the data is dependant on this and as such incomplete records appear in the custom logs. Just wondered if there was any way we could counter this...
  21. don't bother - there are so many clients - set your default to html (if you want html that is) and allow others to opt out. I personally would do it the other way - plain text and opt in to html but thats just me.
  22. Agreed Andy, while you can some nice things you should always take care that when someone visits your page it is clear which elements are for interaction and which are not.
  23. OK need some hardcore help here... I want to detect if a client is connecting through a proxy(inluding transparent) or not. What measures can I take to authenticat the source of the request before I even ask for login details. $_SERVER['REMOTE_ADDRESS'] is the only thing I can think of using but surely it is not sufficient to trust its value.
  24. you should NOT remove a submit button in favour of a javascript link to submit a form... ok have a submit button insside a <noscript> tag if you must but at the very least have one in there.. Why do you need to NOt have a submit button?
×
×
  • 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.