User Profile

Collapse

Profile Sidebar

Collapse
kovik
kovik
Last Activity: Feb 2 '13, 06:42 AM
Joined: Jun 29 '07
Location: Baltimore
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kovik
    replied to making a div a link
    The thread that never dies. At least it gives me a reason to check up on Bytes and read how much of a **** I used to be. Good times, man. Good times.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    Okay. For future reference, when we ask for you to echo something, echo it and tell us the results so that we can help. Programmers (in PHP, especially) can do things in many different ways and until we get more specifics, we can't do much else. My suspicion was that the id in your query string was invalid and I was trying to demonstrate that to you without saying it outright.

    It was possible that I was wrong, though I'm usually right....
    See more | Go to post

    Leave a comment:


  • kovik
    replied to How to replace DOT by COMMA?
    in PHP
    And if you don't want this to be editable, then don't provide a text box for it. The forum post that you just made has a date and time on it, but you were never given the ability to select that. It was automatically generated and associated with your post after you pressed "submit."
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    Programmers who take pride in their work don't take kindly to lazy programmers who don't know how to debug. If you continue this attitude, you will start to see a pattern.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to How to replace DOT by COMMA?
    in PHP
    That is very vague. Place it where?
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    Programming is my job. As such, I don't work for free. Advice is free. Labor is not. Now start debugging.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    And is there a value? Try print_r($person ). It's possible that your query returned no results, which you currently aren't checking for.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    If it says a variable is undefined on line 13, chances are a variable is undefined on line 13. Try echoing it to check.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    If you use the braces, you're supposed to use quotation marks on the key. Otherwise, they are optional.

    Code:
    $u = "UPDATE `people` SET `Name`='$_POST[inputName]', `Description`='$_POST[inputDesc]' WHERE ID = $_POST[id]";
    or

    Code:
    $u = "UPDATE `people` SET `Name`='{$_POST['inputName']}', `Description`='{$_POST['inputDesc']}' WHERE ID = {$_POST['id']}";
    See more | Go to post

    Leave a comment:


  • Firstly, what you want to do is not possible. You can't control the upload or modify the files on the user's computer. You can only accept or deny the upload. And if 3MB is a slow upload, then you should consider upgrading your server's connection since videos can get much, much larger than that. The upload speed is related to the speed of the client's connection and the speed of the server's connection. Generally, you want the client's connection...
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Why MySQL won't update via php?
    in PHP
    Did that code work? I'd imagine not since you are still using single quotes instead of backticks.

    Code:
    $u = "UPDATE `people` SET `Name`='$_POST[inputName]', `Description`='$_POST[inputDesc]' WHERE ID = $_POST[id]";
    See more | Go to post

    Leave a comment:


  • kovik
    replied to How to replace DOT by COMMA?
    in PHP
    That code is very odd... It looks at your number as a string when your number is not a string at any point. You'll want to use number_format() to replace the round() and the strpos() use simultaneously.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to How to code a job board?
    in PHP
    Isn't that the first step? lol

    Well, for e-mail:

    1. You need an e-mail address.
    2. Your server needs to be able to send out e-mail.
    3. Google for an advanced PHP mailing library or use mail().
    4. ???
    5. Profit.


    For database:

    1. You need a database.
    2. You need a form.
    3. When the form is submitted, start processing.
    4. Connect to your...
    See more | Go to post

    Leave a comment:


  • You can utilize cURL to simulate POST and GET requests.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Change the text in nav tab
    in PHP
    Don't double post...
    See more | Go to post

    Leave a comment:


  • kovik
    replied to Family Tree Using PHP
    in PHP
    You say this as though you've found complicated solutions, already. Family trees don't sound like something that many developers develop, so I'd go with whatever you can find.
    See more | Go to post

    Leave a comment:


  • Find out which files control the <title> attribute. Get a program like Notepad++ and do a search in all PHP files (or HTML/TPL files if there's a template engine) for the string "<title>".
    See more | Go to post

    Leave a comment:


  • It may be more useful if you give us an example of what you are trying to accomplish. There is no general way to "just test" in PHP.
    See more | Go to post

    Leave a comment:


  • kovik
    replied to How to convert span tags in a String?
    in PHP
    Oh. For some reason, my mind was thinking that bold was a font-style, not a font-weight. We'd just change it to this:
    Code:
    $styles = array(
      'font-style:\s?italic' => 'i',
      'font-weight:\s?bold' => 'b',
    );
     
    foreach ($styles as $css_rule => $desired_tag) {
        $regex = '~<span[^>]+?style="[^"]*' . $css_rule . '[^"]*"[^>]*>(.*?)</span>~';
         $content = preg_replace($regex,
    ...
    See more | Go to post

    Leave a comment:


  • Or, since you're asking in the PHP forum:
    Code:
    echo date('H:i:s', strtotime($mysql_date));
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...