Skip to main content

Home/ Web Programming/ Challenge 4-g
Caruso  Nicholas L

Challenge 4-g - 13 views

started by Caruso Nicholas L on 19 Mar 09
  • Caruso  Nicholas L
     
    I'm getting the following error msgs for challenge 4-g and I have no idea why...

    The comments are going into my database AND they are posting to the page after submitted. But - these errors come up before you fill out the form and submit:

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /f1/content/rocksteadyvybes/public/soup2.php on line 76

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /f1/content/rocksteadyvybes/public/soup2.php on line 80


    How do I get rid of them? I checked the code on both lines and nothing!

    My line 76: $result = mysql_query($sql,$db);
    My line 80: while ($row = mysql_fetch_array($result)) {
  • Alex Halavais
     
    This looks to be a connection problem. Hard to say without seeing the whole thing, but I'm about to post to the blog a conversation I had over chat with another student. Need to include the "or die" alternative to successful connection and selections to see if that might be the issue.

    - A
    Caruso Nicholas L wrote:
    > I'm getting the following error msgs for challenge 4-g and I have no idea why...
    >
    > The comments are going into my database AND they are posting to the page after submitted. But - these errors come up before you fill out the form and submit:
    >
    > Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /f1/content/rocksteadyvybes/public/soup2.php on line 76
    >
    > Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /f1/content/rocksteadyvybes/public/soup2.php on line 80
    >
    >
    > How do I get rid of them? I checked the code on both lines and nothing!
    >
    > My line 76: $result = mysql_query($sql,$db);
    > My line 80: while ($row = mysql_fetch_array($result)) {

To Top

Start a New Topic » « Back to the Web Programming group