Hi

Can anyone shed some light on this problem?

The DB update only happens when I change the if(isset($submit)) to read
if(!isset($submit)).

Yes, I am using PHP 4.0.6 but have also tried with PHP 4.2.2, same problem.
Code snippet:

    //HTML <body> ....
    <?php
    if(isset($Sumbit)):

    /* Connecting, selecting database */
    $link = mysql_connect("192.168.0.100", "sff_user", "sff98")
        or die("Could not connect");
    print "Connected successfully.<br>";

    mysql_select_db("sff") or die("Could not select database");
    $doit1 = "INSERT INTO members
VALUES(NULL,'$first_name','$last_name','$addr1',

'$addr2','$postnummer','$postort','$land','$tel','$mob','$email','$memb_date
','$comments')";
     mysql_query($doit1); //put the data in members table

    printf ("<b>Database updated.</b> Enter a new member?");

    /* Closing connection */
    mysql_close($link);
    endif;
    ?>
    //print HTML form etc...

Simon



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to