SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    London
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    please help me create a regsiter script!

    hi,

    I need people on my site to be able to register. When they resgiter i want them to get a confirmation email and their details to be split so say i know who have asked for the newsletter.

    Can anyone help; or even point me in the right direction plllz!

    Thanks

  2. #2
    Drupaler bronze trophy greg.harvey's Avatar
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    3,258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Erm. First you need to decide on a programming language/gateway interface to use. This may be dictated by the capabilities of your current host.

    PHP
    Perl
    ASP
    CFM

    They're the common options.

  3. #3
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What combination of database/scripting language are you using?

    Here's a php/mysql tutorial: http://www.sitepoint.com/article.php/319/6

  4. #4
    SitePoint Member
    Join Date
    Jun 2003
    Location
    London
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea thanks i got it; but i cant get it work; i get "The site database appears to be down"

    I think ive put the db name in the wrong place; heres what i got:

    <?php // db.php

    $dbhost = "localhost";
    $dbuser = "dream_johannafor";
    $dbpass = "pass";

    function dbConnect($db="dream_register") {
    global $dbhost, $dbuser, $dbpass;

    $dbcnx = @mysql_connect($dbhost, $dbuser, $dbpass)
    or die("The site database appears to be down.");

    if ($db!="dream_register" and !@mysql_select_db($db))
    die("The site database is unavailable.");

    return $dbcnx;
    }
    ?>

  5. #5
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And it's not a simple typo, e.g. "dream_johannafor" should be "dream_johannaford"?

  6. #6
    SitePoint Member
    Join Date
    Jun 2003
    Location
    London
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yea no it should be dream_johannafor

  7. #7
    SitePoint Member
    Join Date
    Jun 2003
    Location
    London
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok sorted that problem! now i get "The site database is unavailable."

  8. #8
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure this is correct?
    if ($db!="dream_register" ...

    if ($db!="" ...
    makes more sense to me, i.e. check that $db isn't a zero length string before trying to select db

  9. #9
    SitePoint Member
    Join Date
    Jun 2003
    Location
    London
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i didnt actually know what is suppose to go into the "" so i just assumed it was the database name; is that wrong?


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
  •