Jump to content

Destramic

Members
  • Posts

    969
  • Joined

  • Last visited

Everything posted by Destramic

  1. my idea is to open configuration.php in replace.php and redefine the value of $WEBSITE_URI ans save it? is this possible? thank destramic configuration.php [code] // Website URI define("WEBSITE_URI", "www.domain.co.uk"); [/code] [code] ... [/code]
  2. im unable to get this to work with check boxes [code] function toggle_checkboxes(the_form) { for (var i = 0; i <the_form.length; i++) { if (the_form[i].type == 'checkbox') { the_form[i].checked = checkbox_status; } } if (checkbox_status) { checkbox_status = false; } else { checkbox_status = true; } } <span onclick="toggle_checkboxes(this.form);">Check/Uncheck all</span> [/code]
  3. the code below will work for strings and arrays...but doesnt seem to work for $_POST and $_GET etc...anyone figure out why ? [code] <?php function strip_slashes($value) { // Check if Magic Quotes is enabled if (get_magic_quotes_gpc()) { // Check if string exists if (is_string($value)) { return stripslashes($value); } elseif (is_array($value)) { return array_map('strip_slashes', $value); } } } ?> [/code]
  4. yes...could get it to work
  5. ok no worries ive got it to work now...can anyone help me on how i would do a onclick with just text alone?
  6. anyone know how?
  7. i think stripslashes should be done before data is added to the database...now we've got the function to work....how do i get it work on input boxes before going to mysql database... as ive said if i type: This\'s an string\'s on submit in the input field it will show: This\\\'s an string\\\'s
  8. im not sure on what you want to do but to use inside a function do something like this [code] <?php function vars(); {     echo $_GET['var'];     echo $_GET['id']; } // display function echo vars(); ?> [/code]
  9. <?php echo $id; ?> using php at the opening tag is good practice...sorry
  10. well then i would do something like this: <?php switch($_GET['id']) {     case "1":     require_once "folder/file.php";     break;     case "2":     require_once "folder/file.php";     break;     case "3":     require_once "folder/file.php";     break; } ?>
  11. do this: index.php?id=01 [code] <?php switch($_GET['id']) {     case "01":     require_once "file1.php";     break;     case "02":     require_once "file2.php";     break; } ?> [/code]
  12. index.php?id=0001&var=22 [code] <?php $id  = $_GET['id']; $var = $_GET['var']; echo "id:" . $id; echo "var:" . $var; ?> [/code]
  13. check_value gets defined here: if (checked_value) { checked_value = false; } else { checked_value = true; }
  14. there should be a way of changing the css class of a select box easily?
  15. ok...well i though the best way to strip slashes is before it is added to the database.... but you think i should do it when i am querying the results? thanks destramic
  16. thank you so much that works fine...only problem i have now is when i use it on my form when i post this: This\'s an string\'s and then submit it will then do something like this in the input box: This\\\'s an string\\\'s is there a simple way of making this work? see for yourself: http://82.47.18.28/error.php?error=404
  17. anyone know how i can stripslashes on array?
  18. i have a problem...i want to9 be able to have my select box displayed and when the user goes through the options the background colour will change...ive made it possible with input and textarea but for some reason or other i cannot get it to work on select box..can anyone help please? [code] <select id="error_type" name="error_type" onmouseover="this.className='mouse_over';"  onmouseout="this.className='this.class';"> <optgroup label="Select Error Type"> <option value=""></option> <option value="Broken Link" <?php echo $broken_link; ?>>Broken Link</option> <option value="Spelling Mistake" <?php echo $spelling_mistake; ?>>Spelling Mistake</option> <option value="Spam" <?php echo $spam; ?>>Spam</option> <option value="Other" <?php echo $other; ?>>Other</option> </optgroup> [/code] </select>
  19. the function seems to work on strings...but arrays i cant get it to work on...help?
  20. does anyone know how i can get it to work?
  21. im thinking maybe my.htaccess file isnt working as i have php_value magic_quotes_gpc on help?
  22. k..but how would i allow only port 80 for income traffic?
  23. try this: when on site type: This\'s an string\'s    in name field and see what happens...(funtion doesnt work) http://82.47.43.58/error.php?error=unknown
  24. hey thanks for the reply...i havent got a router..
  25. sorry still no luck =/
×
×
  • 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.