Jump to content

yahn

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by yahn

  1. I just want to find the tag itself. I want to be able to find <body and </body. it is finding <body but it's not finding </body. My regex now is: /(<(?:html|head|body)[^>]*>)/i . Is there anything wrong?
  2. I want to find the beginning of html, head and body tags. I'm using /<?/html|/<?/head/|/<?/body/ what am I doing wrong? I'm not very good with regex, so probably a lot, but if someone could help me out I would really appreciate it. Thank you.
  3. I have an extension stored in a directory.  The directory where the extension is stored is set to the extension_dir.  The problem is that the extension is not being loaded at run time.  I have to manually load the extension using dl().  I don't want to have to do that because that wastes time.  How can I get it to be loaded at runtime so I can use it without having to call dl() first?
  4. Thank you.  That worked perfectly.
  5. I'm inserting NOW() into a mysql database and when I query that timestamp out, I want to see if NOW() then was 15 minutes ago.  I don't know how to do that, so can anyone tell me?
  6. Ahh.  It's been too long since I've been working with mysql.  Thank you.
  7. I'm using ajax and I want to send a javascript function as text so I don't have to load every function I need in the aplication from the start.  But I don't know how to actually put brackets and semicolons in a string.  So if I wanted turn a simple [code=php:0]function foo() { alert('bar'); }[/code] into a string so I could send it as text how would I do that?  Thank you for your time.
  8. I take the slashes out at the end of the code, either way I canged it and it still gives the same error. Does anything else seem like it could be causing a problem?
  9. here is my code: [code]     if (!get_magic_quotes_gpc())     {         $_SESSION['username'] = addslashes($_SESSION['username']);     }     $name = $_SESSION['username'];     $query = "SELECT user_pass FROM general_users WHERE user_name = '{$name}'";     $pass = mysql_query($query);     $password = mysql_result($pass, 0, 'user_pass'); // line 28     $_SESSION['password'] = stripslashes($_SESSION['password']); [/code] here is my error [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 4 in W:\www\connect.php on line 28[/quote] What this code is suppose to do is keep you logged in using sessions. This doesn't make sense to me because I use the same exact code to log in and it doesn't give an error, and the first time the page runs after you log in it doesn't give an error. Does anyone know what the problem is?
×
×
  • 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.