Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default What is wrong with this code?

    http://www.hablaugh.dkhosting.co.uk/system/give.php

    Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in /home/hablaugh/public_html/system/give.php on line 4

    Warning: mysql_query(): A link to the server could not be established in /home/hablaugh/public_html/system/give.php on line 4

    Warning: Cannot modify header information - headers already sent by (output started at /home/hablaugh/public_html/system/give.php:4) in /home/hablaugh/public_html/system/give.php on line 5
    This is the error i get. This is for the techtuts badge system but i just get this error
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  2. #2
    Join Date
    May 2006
    Posts
    44
    Tokens
    0

    Default

    Errrrmmm...
    Sorry but I don't know
    lol

  3. #3
    Join Date
    Aug 2005
    Location
    Newcastle
    Posts
    1,417
    Tokens
    0

    Latest Awards:

    Default

    First one you may have miss typed your password or host or DB name. If those are correct, try adding the user into that database - I often forget that part.

    Could you also post lines 1-10 in the "give.php"



  4. #4
    ShoutCast Guest

    Default

    EDIT: craig beat me to it.
    since its not using the password theres the erorr. did u set the password? pass='password' or w.e the password feild is on techtuts
    Last edited by ShoutCast; 27-05-2006 at 11:05 PM.

  5. #5

    Default

    Without the actual PHP/mySQL code we cannot check your code for errors or correct it but the first line seems to say that you are not using a password for mySQL connection.

  6. #6
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    <? $bn = $_POST['badge'];
    $uname = $_POST['user'];

    mysql_query("INSERT INTO badges (bname, uname) VALUES ('$bn', '$uname')");
    header("Location: index.php?page=abadge");
    ?>
    That is what is in give.php
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  7. #7
    ShoutCast Guest

    Default

    Try this code:
    <?
    include("config.php");
    $bn = $_POST['badge'];
    $uname = $_POST['user'];

    mysql_query("INSERT INTO badges (bname, uname) VALUES ('$bn', '$uname')");
    header("Location: index.php?page=abadge");
    ?>

  8. #8
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Post

    Quote Originally Posted by ShoutCast
    Try this code:
    Thank you that works +Rep
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  9. #9
    ShoutCast Guest

    Default

    make sure you include config.php in every file always seems to fix problems.

  10. #10
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Default

    Ok ........
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

Page 1 of 2 12 LastLast

Posting Permissions

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