SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    refuses to work as always

    PHP Code:
    <?php include("idnum.php"); include("dbconn.php"); if ($pword==$insertpasswordhere) { 
    $result mysql_query("select * from queue");
    while (
    $row mysql_fetch_assoc($result)) {

    $sname=stripslashes($row["sname"]); $semail=stripslashes($row["semail"]); $artist=stripslashes($row["artist"]); $lartist=stripslashes($row["lartist"]); $title=stripslashes($row["title"]); $bwith=stripslashes($row["bwith"]); $lyrics=stripslashes($row["lyrics"]); $sdate=stripslashes($row["sdate"]); $sid++;

    $blargh mysql_query("insert into lyrics (sname, semail, artist, lartist, title, bwith, lyrics, sdate, sid) values ('$sname', '$semail', '$artist', '$lartist', '$title', '$bwith', '$lyrics', '$sdate', '$sid')");

    }

    $handle fopen("idnum.php"'w');
    fputs($handle"<?php \$sid=$sid; \$qid=$qid; ?>");
    fclose($handle);

    $result mysql_query("delete * from queue");
    } else { echo 
    "Incorrect password."; } ?>
    I'm guessing that the $blargh query is failing. But what am I doing wrong?

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    need more info. how's it failing? any error message?
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No error message, it just sorta sits there.

  4. #4
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, well is that the whole script?

    as long as you don't have an incorrect password it doesn't look it echo()s anything... so it would appear to just sit there. i just noticed that.

  5. #5
    :) delemtri's Avatar
    Join Date
    Jun 2001
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhh, I know this, I wrote the script...

    Trouble is, it doesn't do anything to the database either.

  6. #6
    Node mutilating coot timnz's Avatar
    Join Date
    Feb 2001
    Location
    New Zealand
    Posts
    516
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you tag "or die (mysql_error())" onto the end of the mysql_query, to see if that sheds any light onto why it isn't inserting it into the database.
    Oh no! the coots are eating my nodes!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •