SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Unsure what i have done worng with a script

    Hello, i wonder if anyone can help me figure this out. I'm pretty new to all this so please be gentle with me

    I wrote a script which is puzzling me as it seems to be working but it isn't. I am trying to make sure a chosen username does'nt already exist in the database before actually inserting the required data to register for my site. My site is not actually live, i am just trying to teach myself how to do some web design and application development. I have a wampserver set up to test everything on.

    The Script:

    <?php
    /**
    * @author The Dark Fool
    * @copyright 2008
    *
    * Registration Script
    *
    **/

    /** Check the required fields from the form
    (Javascript 'Liveforms' should have done this already, but double checking anyway just in case)**/
    if ((!isset($_POST["username"])) || (!isset($_POST["password"])) || (!isset($_POST["birth_year"])) || (!isset($_POST["email"])) || (!isset($_POST["disclaimer"]))) {
    header("Location: Register.php");
    exit;
    }
    /** Include neccesary files **/
    include 'Includes/Database.php';
    $dbcxn;

    /** Check that the username does not already exist. **/
    $user = $_POST["username"];
    $sql = "SELECT username FROM register WHERE username='$user'";
    $res = mysql_query($dbcxn, $sql);
    $num = mysql_num_rows($res); /** Result should not be greater than 0 **/
    if ($res > 0) { /** Redirect to inform the user to choose another username**/
    header("Location: Reg-UN-Exists.php");
    }

    else {

    /** Set VALUE variables **/
    $username = $_POST["username"];
    $birth_year = $_POST["birth_year"];
    $email = $_POST["email"];
    $disclaimer = $_POST["disclaimer"];
    $password = $_POST["password"];

    /** Issue the instruction to the database **/
    $register = "INSERT INTO register (username, birth_year, email, disclaimer, password)
    VALUES ('$username', '$birth_year', '$email', '$disclaimer', md5($'password')";

    $result = mysql_query($dbcxn, $register);
    if ($register == TRUE) {
    header("Location: Login.php");
    }
    }
    mysql_close($dbcxn);
    ?>

    Now as far as i know since i put it together in parts, the script makes sure the forms feilds are filled in (both client side javascript, and then server side) then i added the database include (this also seemed to work as no database was there at first, and then when it was there was no table) the errors reported this and so i figured this bit worked.

    Now what puzzles me is that it seems to go through the motions and takes me to the login page, but upon checking the database nothing has been inserted at all.

    As far as i know there are no errors in the script itself, like i say, it appears to work but doesn't so any help will be helpful as i get no errors saying parse error, or unexcted T variable. Just opens up the next step which is login. The login script isnt made yet, one thing at a time.

    The form is an include file, and is running some javascript to validate it. The database info is also an include file.

    Any help or suggestions is appreciated.
    Thanks in advance.

    Edit: The VALUE variables were added after i tried it for the first time thinking it might help, but it hasn't helped, and nor has it changed anything. I thought i'd at least get some error messages or something, but no. Puzzled and confused very much.
    Last edited by TheDarkFool; Jun 11, 2008 at 08:59. Reason: forgot to add something

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    This:-
    PHP Code:
    if ($res 0) { /** Redirect to inform the user to choose another username**/
            
    header("Location: Reg-UN-Exists.php");
            } 
    Should be:-
    PHP Code:
    if ($num 0) { /** Redirect to inform the user to choose another username**/
            
    header("Location: Reg-UN-Exists.php");
            } 
    Also, this:-
    PHP Code:
    $register "INSERT INTO register (username, birth_year, email, disclaimer, password)
            VALUES ('
    $username', '$birth_year', '$email', '$disclaimer', md5($'password')"
    Should be:-
    PHP Code:
    $register "INSERT INTO register (username, birth_year, email, disclaimer, password)
            VALUES ('
    $username', '$birth_year', '$email', '$disclaimer', md5('$password')"
    And whilst were at it...this:-
    PHP Code:
    $result mysql_query($dbcxn$register);
    if (
    $register == TRUE) {
        
    header("Location: Login.php");
        } 
    should be:-
    PHP Code:
    $result mysql_query($dbcxn$register);
    if (
    $result == TRUE) {
        
    header("Location: Login.php");
        } 
    Phew! That should do it!

  3. #3
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the quick response. I altered the bits you spoke of although it took me five reads of the post to see what you were on about (very minute changes).

    Anyway now i get these errors:


    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 23

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\RegData.php on line 24

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 42

    Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 47

    Thanks again though for your help.

    Edit: would it be better i altered the mysql bits to mysqli ?
    a book i have suggests that mysqli is more appropriate to php 5.
    Last edited by TheDarkFool; Jun 11, 2008 at 09:29. Reason: thought of something to add

  4. #4
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    No worries, I should have been clearer, sorry.

    Are you sure you have connected to the database? I did notice however, you redeclare the $dbcxn variable are including your database script...

    Why is this? It should not be necessary...

    Can you post the database script contents? Obviously excluding the authentication details..

  5. #5
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sure no probs.

    <?php
    /**
    * @author The Dark Fool
    * @copyright 2008
    **/

    /** Database Connection Details **/
    $dbcnx = @mysql_connect('localhost', '?????', '????????');
    if (!$dbcnx) {
    exit('Error connecting to the site database.');
    }
    if (!@mysql_select_db('firedabblers', $dbcnx)) {
    exit('Error opening the site database.');
    }
    ?>

    When i tested this i had no databse and the error repoted this, then i tested it without a table and again the error suported this, now however, i dont get any errors concerning connecting to the database. I guess because the database name and table are present.

  6. #6
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Try altering the script and omitting the $dbcxn variable after :-

    PHP Code:
    include 'Includes/Database.php'
    With regards to MySQLi , I wouldn't worry about it just yet, let's get this thing working first...

  7. #7
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Think I got it...

    You connect using:-

    PHP Code:
    $dbcnx 
    Yet try to query the DB using this handle:-

    PHP Code:
    $dbcxn 
    Just a few typo's after all!

  8. #8
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Omitted the $dbcxn after including the database file, however, I still got these errors:


    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 22

    which is : $res = mysql_query($dbcxn, $sql);

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\RegData.php on line 23

    Which is : $num = mysql_num_rows($res); /** Result should not be greater than 0 **/

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 41

    which is : $result = mysql_query($dbcxn, $register);

    Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 46

    and last but not least : mysql_close($dbcxn);

    Edit: arh i see what you mean now. I should really get some glasses shouldn't i

    Rechecked all the bits concerning the $dbcnx variable so they are all the same, and tested the regisrtations again, but still suffering those mysql invalid links.

    IE these:

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 22

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\RegData.php on line 23

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 41

    Edit: managed to sort one of them out 3 left to fix.
    Last edited by TheDarkFool; Jun 11, 2008 at 10:43. Reason: Something to add

  9. #9
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    OK, try doing this on each of the queries...

    PHP Code:
    if( ! $result mysql_query($dbcxn$register) )
    {
        die( 
    'MySQL error: ' mysql_error() );

    It should give you some more information.

  10. #10
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Unsure where you mean.

    the lines that are being referred to as invalid mysql links/resource are:

    line 22 - $res = mysql_query($dbcnx, $sql);

    line 23 - $num = mysql_num_rows($res); /** Result should not be greater than 0 **/

    line 41 - $result = mysql_query($dbcnx, $register);

    line 24 and 42 already have an if statement.

    Slightly lost as to how you want me to add those extra bits to clarify a bit more info on the errors that are being referred to.

    for example: we'll say line 41

    $result = mysql_query($dbcnx, $register); -- so you want me to add the extra underneath this line and then allow the script to carry on as normal ?
    so it would look something like this:

    $result = mysql_query($dbcnx, $register);
    if( ! $result = mysql_query($dbcnx, $register) ){ die( 'MySQL error: ' . mysql_error() );}
    if ($result == TRUE) {
    header("Location: Login.php");
    }

    This might show you how unsure i am as to what you mean.

  11. #11
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    OK, if you're going to do that, do it like this....

    After each:-
    PHP Code:
    $x mysql_query(.....) 
    Put:-
    PHP Code:
    if( ! $x )
    {
        die( 
    'MySQL Error: ' mysql_error() );

    Then normal code...

  12. #12
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LOL we was doing fine then it sort of went (WHOOSH) right over my head LOL

    I think i confused meself though.

  13. #13
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    hehe, try:-

    PHP Code:
    <?php

    /**
    * @author The Dark Fool
    * @copyright 2008
    *
    * Registration Script
    *
    **/

    /** Check the required fields from the form
    (Javascript 'Liveforms' should have done this already, but double checking anyway just in case)**/
    if ((!isset($_POST["username"])) || (!isset($_POST["password"])) || (!isset($_POST["birth_year"])) || (!isset($_POST["email"])) || (!isset($_POST["disclaimer"]))) {
    header("Location: Register.php");
    exit;
    }
    /** Include neccesary files **/
    include 'Includes/Database.php';

    /** Check that the username does not already exist. **/
    $user $_POST["username"];
    $sql "SELECT username FROM register WHERE username='$user'";
    $res mysql_query($dbcnx$sql);
    if( ! 
    $res )
    {
        die(
    'MySQL Error: '.mysql_error($dbcnx));
    }
    $num mysql_num_rows($res); /** Result should not be greater than 0 **/
    if ($num 0) { /** Redirect to inform the user to choose another username**/
    header("Location: Reg-UN-Exists.php");
    }

    else {

    /** Set VALUE variables **/
    $username $_POST["username"];
    $birth_year $_POST["birth_year"];
    $email $_POST["email"];
    $disclaimer $_POST["disclaimer"];
    $password $_POST["password"];

    /** Issue the instruction to the database **/
    $register "INSERT INTO register (username, birth_year, email, disclaimer, password) VALUES ('$username', '$birth_year', '$email', '$disclaimer', md5('$password')";

    $result mysql_query($dbcnx$register);

    if( ! 
    $result )
    {
        die(
    'MySQL Error: '.mysql_error($dbcnx));
    }

    if (
    $result == TRUE) {
    header("Location: Login.php");
    }

    }

    mysql_close($dbcnx);

    ?>

  14. #14
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol, whilst waiting for a bit to give you time to see the post i attempted to change some of the mysql to mysqli and now only have one error to cope with. I also altered my database connection (but kept the original by commenting it out for a while) and now know its definately connecting.

    this is what i have now

    database file:

    $mysqli = mysqli_connect("localhost", "?????", "????????", "firedabblers");
    if (mysqli_connect_errno()) {
    printf("Connect Failed: &#37;s\n", mysqli_connect_error());
    exit();
    } else {
    printf("Host Information: %s\n", mysqli_get_host_info($mysqli));
    }

    and the reg script:
    /** Check the required fields from the form
    (Javascript 'Liveforms' should have done this already, but double checking anyway just in case)**/
    if ((!isset($_POST["username"])) || (!isset($_POST["password"])) || (!isset($_POST["birth_year"])) || (!isset($_POST["email"])) || (!isset($_POST["disclaimer"]))) {
    header("Location: Register.php");
    exit;
    }
    /** Include neccesary files **/
    include 'Includes/Database.php';

    /** Check that the username does not already exist. **/
    $user = $_POST["username"];
    $sql = "SELECT username FROM register WHERE username='$user'";
    $res = mysqli_query($mysqli, $sql);
    $num = mysql_num_rows($res); /** Result should not be greater than 0 **/ ERROR HERE
    if ($num > 0) { /** Redirect to inform the user to choose another username**/
    header("Location: Reg-UN-Exists.php");
    }

    else {

    /** Set VALUE variables **/
    $username = $_POST["username"];
    $birth_year = $_POST["birth_year"];
    $email = $_POST["email"];
    $disclaimer = $_POST["disclaimer"];
    $password = $_POST["password"];

    /** Issue the instruction to the database **/
    $register = "INSERT INTO register (username, birth_year, email, disclaimer, password)
    VALUES ('$username', '$birth_year', '$email', '$disclaimer', md5('$password')";

    $result = mysqli_query($mysqli, $register);
    if ($result == TRUE) {
    header("Location: Login.php");
    }
    }
    mysqli_close($mysqli);

    when i try to register it gives me this:
    Host Information: localhost via TCP/IP
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\RegData.php on line 23

    In looking through a book i borrowed of a friend i cant seem to find anything that fixes the line where i have wrote "error here" in capital letters.

    EDIT:
    I fixed the last error but it still doesnt insert the data, nor does it take me to my login page. Instead though i have this on my screen:
    Host Information: localhost via TCP/IP

    so now i'll go back to what you suggested and try that for size.

    I do thank you for your help though, otherwise i'd be going round in circles like i have done many times before.

    Final edit of this post:
    Reverted back to my original script that was posted with all your pointers added like corrected typo's (lol).
    I tried your suggestion and this is what i get:

    Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\RegData.php on line 22
    MySQL Error:

    line 22 is this:

    $res = mysql_query($dbcnx, $sql);
    Last edited by TheDarkFool; Jun 11, 2008 at 13:04. Reason: after trying your suggestion had to post result

  15. #15
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Another typo it appears...

    PHP Code:
    $res mysqli_query($mysqli$sql); 
    Should be:-
    PHP Code:
    $res mysqli_query($sql$mysqli); 

  16. #16
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh dear me, now i got this:

    Host Information: localhost via TCP/IP
    Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\wamp\www\RegData.php on line 22

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\RegData.php on line 23

    Hmm, i think i'll take a break. staring at code all day is not good for the eyes LOL

    Edit: altered the mysql_num_rows to be mysqli_num_rows, and tried again.

    got this:
    Host Information: localhost via TCP/IP
    Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\wamp\www\RegData.php on line 22

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:\wamp\www\RegData.php on line 23
    Last edited by TheDarkFool; Jun 11, 2008 at 13:28. Reason: altered code and tried again

  17. #17
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You owe me a beer!

    PHP Code:
    <?php
    if ($_POST)
    {
        if((!isset(
    $_POST["username"])) || (!isset($_POST["password"])) || (!isset($_POST["birth_year"])) || (!isset($_POST["email"])) || (!isset($_POST["disclaimer"])))
        {
            
    //--> Connect to database.
            
    require('includes/database.php');
            
            
    //--> Declaring variables.
            
    $username mysqli_real_escape_string($_POST['username']);
            
    $birth_year mysqli_real_escape_string($_POST['birth_year']);
            
    $email mysqli_real_escape_string($_POST['email']);
            
    $disclaimer mysqli_real_escape_string($_POST['disclaimer']);
            
    $password mysqli_real_escape_string($_POST['password']);
            
            
    //--> Checking username
            
    $sql "SELECT username FROM register WHERE username = '$username';";
            
    $res mysqli_query$mysqli $sql );
            if( !
    $res )
            {
                if(
    mysqli_num_rows($res) === 0)
                {
                    
    $sql "INSERT INTO register (username, birth_year, email, disclaimer, password) VALUES ('$username', '$birth_year', '$email', '$disclaimer', md5('$password')";
                    
    $res mysqli_query$mysqli $sql );
                    if( ! 
    $res )
                    {
                        
    //--> WooHoo!
                        
    header('Location: Login.php');
                        exit();
                    }
                    else
                    {
                        echo 
    'MySQL Error: ' mysqli_error$mysqli );
                        exit();
                    }
                }
                else
                {
                    
    //--> Username exists.
                    
    header('Location: Reg-UN-Exists.php');
                    exit();
                }
            }
            else
            {
                echo 
    'MySQL Error: ' mysqli_error$mysqli );
                exit();
            }
        }
        else
        {
            
    //--> Pretty sure this needs to be a full URL...
            
    header('Location: Register.php');
            exit();
        }
    }
    else
    {
        echo 
    'Not a POST request.';
    }
    ?>

  18. #18
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    LoL you wrote a fair bit there bud, cheers.

    Phew, took a while. Right so heres what i got for the main reg script:

    <?php
    /**
    * @author The Dark Fool
    * @copyright 2008
    *
    * Registration Script
    *
    **/

    /** Check the required fields from the form
    (Javascript 'Liveforms' should have done this already, but double checking anyway just in case)**/
    if ((!isset($_POST["username"])) || (!isset($_POST["password"])) || (!isset($_POST["birth_year"])) || (!isset($_POST["email"])) || (!isset($_POST["disclaimer"]))) {
    header("Location: Register.php");
    exit;
    }
    /** Include neccesary files **/
    include 'Includes/Database.php';

    /** Declaring variables. **/
    $username = mysqli_real_escape_string($_POST['username']);
    $birth_year = mysqli_real_escape_string($_POST['birth_year']);
    $email = mysqli_real_escape_string($_POST['email']);
    $disclaimer = mysqli_real_escape_string($_POST['disclaimer']);
    $password = mysqli_real_escape_string($_POST['password']);

    /** Checking username **/
    $sql = "SELECT username FROM register WHERE username = '$username';";
    $res = mysqli_query( $mysqli , $sql );
    if( !$res )
    {
    if(mysqli_num_rows($res) === 0)
    {
    $sql = "INSERT INTO register (username, birth_year, email, disclaimer, password)
    VALUES ('$username', '$birth_year', '$email', '$disclaimer', md5('$password')";
    $res = mysqli_query( $mysqli , $sql );
    if( ! $res )
    {
    /** WooHoo! **/
    header('Location: Login.php');
    exit();
    }
    else
    {
    echo 'MySQL Error: ' . mysqli_error( $mysqli );
    exit();
    }
    }
    else
    {
    /** Username exists. **/
    header('Location: Reg-UN-Exists.php');
    exit();
    }
    }
    else
    {
    echo 'MySQL Error: ' . mysqli_error( $mysqli );
    exit();
    }
    } <-- error is here seemingly
    else
    {
    /** Pretty sure this needs to be a full URL...**/
    header('Location: Register.php');
    exit();
    }
    }
    else
    {
    echo 'Not a POST request.';
    }
    ?>

    I guess i did something wrong as i get this:

    Parse error: syntax error, unexpected '}' in C:\wamp\www\RegData.php on line 60

    :'(

  19. #19
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Does the code I supplied work ok?

  20. #20
    SitePoint Member TheDarkFool's Avatar
    Join Date
    Jun 2008
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    has an error on line 60, i marked the line in the post above with red writing.

    It said unexpected } on line 60 blah blah blah.

    Edit: Things i tried out after it failed.

    Removal of the unexpected } on line 60 - Resulted in an unexpected T variable right after it.

    Removed all the error parts and this resulted in :

    Host Information: localhost via TCP/IP
    Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\wamp\www\RegData.php on line 20

    Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\wamp\www\RegData.php on line 21

    Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\wamp\www\RegData.php on line 22

    Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\wamp\www\RegData.php on line 23

    Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\wamp\www\RegData.php on line 24
    Not a POST request.


    I finally fixed my problem, however, i totally wrote a new script, just altered my database table structure and went with a standard isql insert statement, (skipped using some logic) and now i can register a user, and if i try to duplicate a username, it refuses to do it, so i finally fixed it and thought i'd say thanks for all your help, i did apreciate it.
    Last edited by TheDarkFool; Jun 12, 2008 at 11:46. Reason: Had to inform SilverBulletUK that i fixed the problem.


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
  •