Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Posts posted by fugix

  1. in delete.php...where is your $row_Recordset1['id'] coming from...you must set up your query again before using this for your redirect

    <?php
    header("Location: image_show.php?id={$row_Recordset1['id']}");
    require('connect.php');
    $deleteid=$_GET['id'];
    mysql_query("DELETE FROM comment WHERE id='$deleteid'") or die(mysql_error());
    ?>

  2. at least you have someone there to guide you.  My first day on the job has usually involved being hired because the previous 1-man-dev-crew left, so I got to walk in the door and figure out what was going on myself.

    The person showing me around just went "blah blah blah" :P

    lol...thats how it usually is  :o

  3. Alright, so I am writing a script for a secretary to do some data entry. With this script there is a few file upload fields, now depending on the item entered not all fields need to be filled out. Therefore, the SQL statement will change depending on whether or not that field was filled out.

     

    Should I just use IF statements to check too see if the POST var was sent, then change the statement accordingly, or would there be a more productive way?

     

    Thanks for any feedback.. :)

    that's what i normally do, if not all of the data is required I set up if statements to see which data is passed an i insert that data in to the db

  4. Okay!

    I figured it out a bit - the following code will display the article title, and the article itself in order as it works it's way through the article as a whole (except the last article does not display the article text, just the title).

     

    Next up I'll start tinkering with writing all of these things to their own files and saving them as the article title!

     

    Thanks again for all of your help Fugix!

    I'm going to keep this thread open just a bit more because I'm sure I may have questions on writing the new files.

     

     

    <?php
    
    echo "<b>Article List:</b>";
    
    $html = file_get_contents("Articles-lot-5-6.html");
    $regexptitle = '#\<h2\>(.+?)\<\/h2\>#s';
    $regexpdata = '#\<\/h2\>(.+?)\<h2\>#s';
    
    $count = 0;
    
    if (preg_match_all($regexptitle, $html, $matches)) {
    
    If (preg_match_all($regexpdata, $html, &$matches2)){
    while ($count < count($matches[0]) ){
    $count++ ;
    echo $matches[0][$count];
    echo $matches2[0][$count];
    }	
    }
    }
    else {
        "There were no article titles found";
    }
    
    ?>
    

     

    im glad you figured it out!! I'll be here if you need anything else!

×
×
  • 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.