SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please tell me what is wrong with this script.. I made it myself, and the datbase exist and so do the tables.. But when i go to the script, it says:

    Parse error: parse error in /usr/local/apache/htdocs/links.php on line 61

    The script is at http://members.nbci.com/dmcirc/test.txt

    Please help. Thank you
    Devin McLean
    http://dreamer.spacecoast.com
    -------------------------

  2. #2
    SitePoint Zealot p2ranger's Avatar
    Join Date
    Jan 2001
    Location
    Colorado, USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, your first problem is that you didn't name your file with a .php extension. From what I saw when I clicked view source, you are trying to post the info to the same page. The next thing is that I doubt that nbci.com has support for php programs. I may be wrong I've never checked into anything for that web host.

    Usually a parse error means you forgot to close a brace or didn't put in a ; somewhere.

    One thing I did see is that the line:

    $result = mysql_query(

    is repeated.

    Post your php code for easier reading by people on the forum too. Click the little button with the # and put the code in between the two tags that show up.

    Jason
    ><>

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Location
    Washington State
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is for sure the problem :
    Code:
      $result = mysql_query(
      
      $result = mysql_query(
    	"SELECT linkname, linkurl, linkde " . 
        "FROM links");
    As stated by Jason, two calls to mysql_query. Try something like this :
    Code:
      $result = mysql_query('SELECT linkname,linkurl,linkde FROM links');
    People "prefer" it when code is presented with .phps extension, it makes it "pretty" :-)


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
  •