I can not seem to get this figuered out I whant to run this function to pull
data out of a file and thin use the data in the rest of the program. When I
do this I get a Parse error: parse error in
c:/httpd/htdocs/autosetup/auto/test.php on line 25
<?php
function getdata( ){
############################################################################
#####
global $domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
$frontpage,$mysql,$userdatabase,$newuser,$newuserpass;
if(file_exists("userdata")) {
$fp2=fopen ("userdata","r")or die("unable to open file ($userdata)");
flock($fp2, 2); //unless ($use_flock == 0);
while ($data = fgetcsv ($fp2, 1000, "|")) {
$num = count ($data);
$row++;
for ($c=0; $c<$num; $c++) {
}
list($domain,$tld,$firstname,$lastname,$userid,$passw,$email,$package,
$frontpage,$mysql,$userdatabase,$newuser,$newuserpass) = $data;
}
//close and del file
fclose ($fp2);
//system ("del userdata");
}
getdata( )
echo $domain; <--This is line 25 which is outside of the function
echo $tld;
echo $firstname;
echo $lastname;
echo $userid;
echo $passw;
echo $email;
echo $package;
echo $frontpage;
echo $mysql;
echo $userdatabase;
echo $newuser;
echo $newuserpass;
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]