Annonceindlæg fra SoftwareOne
03. august 2001 - 15:27
#6
hehe :) jeg har lavet en selv, jeg kunne sgu nemlig ikke helt selv huske hvordan det gjordes den ser sådan ud: //function for adding the affiliate function addaffiliate ($fname, $lastname, $company, $streetname, $zipcode, $city, $country, $phone, $cellphone, $fax, $email, $contact, $author, $publisher, $rightholder) { if ($contact == \'true\') { if (mysql_query(\"INSERT INTO contacts (cont_firstn, cont_lastn, cont_email, cont_adress, cont_zipcode, cont_city, cont_country, cont_company, cont_phonenb, cont_faxnb, cont_mobilenb) VALUES (\'$fname\', \'$lastname\', \'$email\', \'$streetname\', \'$zipcode\', \'$city\', \'$country\', \'$company\', \'$phone\', \'$fax\', \'$cellphone\')\")) {$return = \"Successfully added contact to database<br>\";} else {$return = \"Failed adding contact to database<br>\";} } if ($author == \'true\') { if (mysql_query(\"INSERT INTO authors (aut_firstn, aut_lastn, aut_email, aut_adress, aut_zipcode, aut_city, aut_country, aut_company, aut_phonenb, aut_faxnb, aut_mobilenb) VALUES (\'$fname\', \'$lastname\', \'$email\', \'$streetname\', \'$zipcode\', \'$city\', \'$country\', \'$company\', \'$phone\', \'$fax\', \'$cellphone\')\")) {$return = $return + \"Successfully added author to database<br>\";} else {$return = $return + \"Failed adding author to database<br>\";} } if ($publisher == \'true\') { if (mysql_query(\"INSERT INTO publishers (pub_firstn, pub_lastn, pub_email, pub_adress, pub_zipcode, pub_city, pub_country, pub_company, pub_phonenb, pub_faxnb, pub_mobilenb) VALUES (\'$fname\', \'$lastname\', \'$email\', \'$streetname\', \'$zipcode\', \'$city\', \'$country\', \'$company\', \'$phone\', \'$fax\', \'$cellphone\')\")) {$return = $return + \"Successfully added publisher to database<br>\";} else {$return = $return + \"Failed adding publisher to database<br>\";} } if ($rightholder == \'true\') { if (mysql_query(\"INSERT INTO rightsholders (right_firstn, right_lastn, right_email, right_adress, right_zipcode, right_city, right_country, right_company, right_phonenb, right_faxnb, right_mobilenb) VALUES (\'$fname\', \'$lastname\', \'$email\', \'$streetname\', \'$zipcode\', \'$city\', \'$country\', \'$company\', \'$phone\', \'$fax\', \'$cellphone\')\")) {$return = $return + \"Successfully added rightsholder to database\";} else {$return = $return + \"Failed adding rightsholder to database\";} } } return $return;