Results 1 to 8 of 8

Thread: Login Problem...

  1. #1

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Login Problem...

    okay i have a script im making for when i dont wana get into PHPmyAdmin.

    heres the code
    PHP Code:
    if(isset($_POST['add_query_command']))

    {

    $result mysql_query$_POST['sql_info'])
      or die(
    mysql_error());

    switch(
    mysql_errno()) {
      case 
    1050:
        break;

      case 
    0:
    echo
    "Query Sucessfull";
        break;

      default:
        die(
    mysql_error());
        break;
    }
    }

    elseif(isset(
    $_GET['sql_help']))

    {

    echo
    "The Help File is being thought up and written as you read.";

    }

    else

    {
     echo
    "<form name=sqlinfo method=post action=$PHP_SELF>
    Write your SQL statements/queries in the textarea below:
    <table width=38%  border=0 cellspacing=0 cellpadding=0>
      <tr>
        <th scope=row>
          <div align=center>
              <textarea name=sql_info cols=70 rows=30></textarea>
            <input name=add_query_command type=submit value=Insert>
            <input name=clearsql type=reset id=clearsql value=Clear>
            <a href='
    $PHP_SELF?sql_help'>SQL HELP</a>
    </div>
    </th>
      </tr>
    </table>
      </form>
    "
    ;

    I get no errors until i try and submit... and its not a bad code error... its a mysql error...

    how can i fix it so that it works... if i cant get this to work... ill just go back to making a php file and hardcoding the "CREATE" and "INSERT" values
    in.
    Last edited by visualAd; Aug 27th, 2005 at 12:47 PM. Reason: restored original text
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  2. #2
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Login Problem...

    ...? by the wat for a user to log in and stay logged in u use cookies but i think u figured it out since ur post changed

  3. #3
    Addicted Member BIOSTALL's Avatar
    Join Date
    Apr 2005
    Location
    Northampton, UK
    Posts
    180

    Re: Login Problem...

    cookies OR sessions... either way

    BIOSTALL

  4. #4

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: Login Problem...

    meh... it was cuz i had **** in the wrong place... so the script kept confusing itself.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  5. #5
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: Login Problem...

    o ok

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Login Problem...

    I have restored the text in the original post, so as other members are able it use the question and response in the future. If you feel that the code contains sensitive information please let me know and I'll delete the thread.

    As a side note, if you don't want others to see your code then don't post it on a public forum.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: Login Problem...

    huh?... lol...the original post was never read... otherwise it wouldnt have changed.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  8. #8
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Login Problem...

    that wasn't the original post?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width