User Profile

Collapse

Profile Sidebar

Collapse
dubdave
dubdave
Last Activity: Oct 10 '06, 07:43 PM
Joined: Aug 10 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi

    It doen't post any mySQL error code - it just runs the 'login failed' part of the script - as though it couldn't access the database

    I have a version of it working fine on a server right now - but if I try to rewrite it to access another table in the same database, or another database, it just runs straight to the login failed page

    I have spent two days trying every variation of the script - different...
    See more | Go to post

    Leave a comment:


  • dubdave
    started a topic Login script which only works some of the time...?
    in PHP

    Login script which only works some of the time...?

    Hi

    I wrote a very basic login script which acesses a mySQL database, like this:-


    <?php

    // compares values entered in login page form with mySQL database,
    and then
    directs either to protected page or to a failure page

    $em = trim($_POST['email']);
    $pw = trim($_POST['password']);

    $link = mysql_connect ('server', 'account', 'password');
    ...
    See more | Go to post

  • dubdave
    replied to Compare Form Data to Database
    in PHP
    Thanks for that - the script is now returning messages nicely. ;)
    See more | Go to post

    Leave a comment:


  • dubdave
    replied to Compare Form Data to Database
    in PHP
    OK

    1) Yes <?php> is wrong - slapped wrist! - ( and I left the ?> off....) but removing the extra bracket still produces the same parse error

    2) Hemashiki's script produces this error:_

    Warning: mysql_fetch_arr ay(): supplied argument is not a valid MySQL result resource.

    3) Ronverdonk - could I ask you what OS and version of php you are running? - I am on Apple OSX 10.3.9, and php...
    See more | Go to post

    Leave a comment:


  • dubdave
    started a topic Compare Form Data to Database
    in PHP

    Compare Form Data to Database

    Hi

    I am trying to write a (very) basic script to compare data retrieved from a form with a mySQL database. In this case it is a simple name and password entry - if there is a corresponding entry in the database, then it prints a simple sucess message, and if not a failure messge.....

    The script looks like this, and I get ' parse error, line 25,( somewhere after $query)

    Any ideas?


    ...
    See more | Go to post
No activity results to display
Show More
Working...