Re: function problem
| From: | Viktor Popov | Date: | Mon, 03 Jan 2005 07:59:15 +0000 |
| Subject: | Re: function problem | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-205493@lists.php.net to get a copy of this message | ||
Hi!
Thank you for the reply!
I have change the function:
function doReg($fname1="",$family1="",$company1="",
$MOL1="", $dannum1="",
$bulstat1="", $phone1="", $email1="", $username1="",
$password1="",
$payment1="",
$maillist1="", $Addr1="", $City1="", $zipcode1="",
$Country1="",
$shippingName1="",
$shippingFamily1="", $shippingphone1="", $shippingAddr1="",
$shippingcity1="",
$shippingzipcode1="", $shippingCountry1="")
{
if(!($link = mysql_pconnect ($DB_SERVER, $DB_LOGIN, $DB_PASSWORD)))
{
echo "the connection failed";
exit();
}
if(!($newresult = mysql_db_query($DB, "insert into
users(name,family,company, MOL,
taxnum, bulstat, phone, email, username, password, payment, maillist, Addr,
City,
zipcode, Country, shippingName, shippingFamily, shippingphone, shippingAddr,
shippingcity, shippingzipcode, shippingCountry)
values('$fname1','$family1','$company1', '$MOL1',
'$dannum1', '$bulstat1',
'$phone1',
'$email1', '$username1', '$password1', '$payment1',
'$maillist1', '$Addr1',
'$City1',
'$zipcode1',
'$Country1','$shippingName1','$shippingFamily1',
'$shippingphone1','$shippingAddr1', '$shippingcity1',
'$shippingzipcode1',
'$shippingCountry1')")))
{
echo "the insertiont cannot be done";
exit();
}
header("Location:http://$HTTP_HOST/$DOCROOT/allright.html");
exit();
}
When i try to insert -> the problem is in the insertion. The message "the
insertiont cannot be done"; appears. Do you know what could be the mistake?
Thank you!
Viktor