Jump to content

Lumio

Members
  • Posts

    679
  • Joined

  • Last visited

    Never

Everything posted by Lumio

  1. You have to escape quotes in quotes. "here is a quote \"" So <?php mysql_db_query("db", "UPDATE post SET pagetext = REPLACE(pagetext,\"<!--QuoteBegin-\",\"[quote]\")", $link); ?>
  2. Yes. I already found out, why it didn't work. I had to add an event with another property. Now this function helped me: function addEvent(el,ev,fn) { if(el.addEventListener) el.addEventListener(ev,fn,false) else el.attachEvent('on'+ev, fn) }
  3. Hi! Is there a way to get all functions, classes and methods of classes with a predefined function of php itself? Or do I have to parse it by myself? greetings
  4. Hi! I list the categories of a web-app of mine with many Dropdown-boxes. It works great with Firefox and so on. But not with IE. So I do it like this: <?php //this is javascript function addCatBox(layer, parent) { if (parent == 0 && layer == cat_layer) return false; else if (parent == 0) { for (var i=(layer+1); i<=cat_layer; i++) { var elm_del = document.getElementById('catDropBox'+i); if (typeof elm_del != "undefined" && elm_del != "null") document.getElementById('articlepage_create_cat').removeChild(elm_del); } cat_layer = layer; return false; } if (layer < cat_layer) { for (var i=(layer+1); i<=cat_layer; i++) { var elm_del = document.getElementById('catDropBox'+i); alert(elm_del); if (typeof elm_del != "undefined" && elm_del != "null") document.getElementById('articlepage_create_cat').removeChild(elm_del); } cat_layer = layer; } cat_layer++; makeRequest ('/ajax/article_categories.php?parent='+parent, writeCategories); } function writeCategories() { if (http_request.readyState == 4) { if (http_request.status == 200) { var xmldoc = http_request.responseXML; var cats_node = xmldoc.getElementsByTagName('categories').item(0); var cats_parent = cats_node.attributes[0].nodeValue; var cats = cats_node.childNodes; var elm_cat = document.getElementById('articlepage_create_cat'); //some code... var newSelection = document.createElement('select'); newSelection.setAttribute('name', 'catDropBox'+cat_layer); newSelection.setAttribute('id', 'catDropBox'+cat_layer); //THIS HERE SHOULD CALL THE FUNCTION addCatBox WHEN THE SELECTION //CHANGES. IT WORKS ON FIREFOX AND CAMINO AND SO ON //BUT _NOT_ ON INTERNET EXPLORER 7 newSelection.setAttribute('onchange', "addCatBox("+cat_layer+", this.value);"); //...some code var bol_error = false; for (var i=0; i<cats.length; i++) { if (cats[i].nodeType == 1) { if (cats[i].nodeName == 'cat') { //... some code that defines cat_id and cat_name var newOption = document.createElement('option'); newOption.setAttribute('value', cat_id); var newOptionVal= document.createTextNode(cat_name); newOption.appendChild(newOptionVal); newSelection.appendChild(newOption); }else if (cats[i].nodeName == 'error') { bol_error = true; cat_layer--; break; } } } if (bol_error === false) { elm_cat.appendChild(newSelection); } //... some code } } I don't know, why Internet Explorer does not call addCatBox.
  5. for sure...: <?php function encodeDec($s) { $n = ''; //convert every sign into hex. for ($i=0; $i<strlen($s); $i++) $n .= str_pad(dechex(ord(substr($s, $i, 1))), '0', STR_PAD_LEFT); return $n; } function decodeHex($s) { $n = ''; //convert every hex into dec and into a sign. for ($i=0; $i<strlen($s); $i+=2) $n .= chr(hexdec(substr($s, $i, 2))); return $n; } $yourPassword = yourPasswordFunction('hello world'); $yourPassword = encodeDec($yourPassword); echo 'Encrypted+converted in hex: '.$yourPassword; $yourPassword = decodeHex($yourPassword); $yourPassword = yourPasswordDecryptFunction($yourPassword); echo 'Decrypted: '.$youPassword; ?>
  6. try to use chmod or something. And also put the Permission of that folder to 777.
  7. The ^ sign tells to ignore the following state. But I can't really help you with that
  8. Create an extra directory, and for every file you create a txt or something where you write the count of all votes and the actual grade. For example: 10|5.5 That means that there voted 10 persons and all in one the file has the grade 5.5 so 5 stars and a half.
  9. Read this: http://www.php.net/set_error_handler That may help you.
  10. Hi My problem is, that I don't want to allow to overwrite existing files I solved that with RewriteCond %{REQUEST_FILENAME}\.* -f But now also RewriteRule does not work. My .htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME}\.* -f RewriteRule ^(.*)$ index.php RewriteRule ^([\w\d]+)/([\w]+)$ index.php?file=$1&action=$2 When I try to open mydomain.com/test/rewrite (does not exist) it does not work. Why? greetings
  11. what is in $_POST['ship_date']? Maybe not that, what you need
  12. Did you do some debuging?
  13. header('Location: thanks.html'); exit;
  14. Do you have access to your php.ini?
  15. 3 posts and all the same. hmm... okay You can also use empty. But empty is a little bit different... var_dump( empty("0") ); var_dump( empty("") ); both are true.
  16. maybe you directory is not writeable. Try error_reporting(E_ALL);
  17. You mean, that you want to ask if it is not set? Like that: <?php if (!isset($var) && !isset($var)) { //code... } //or if (isset($var) === false && isset($var) === false) { //your code } ?>
  18. Please use [.code]Your code[./code] (without dots) for your code. Looks like that <?php echo 'And php'; ?> I don't want to help you with that until you did that Sorry.
  19. Maybe it only shows you the cached page.
  20. Please use [.code]Here is your code[./code] (without dots) for viewing code. At first... your $post_vars and other variables are not defined. The most functions in php are lowercase... so error_reporting To remove a variable use unset()
  21. Lumio

    SSL

    SSL: As you can see is SSL good for security.
×
×
  • 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.