Guest_imported
New member
- Jan 1, 1970
- 0
I have a flat file that i read in:
$fp = fopen("$homedir/user.txt","r"
flock($fp,2);
while($userinfo = fscanf($fp,"%[a-zA-Z0-9,. ]|%[a-zA-Z0-9@,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]\n"){
list($id,$name,$pass,$email,$farmname,$address,$city,$state,$zip,$phone1,$phone2,$phone3)=$userinfo;
if($uid == $id){
$this_id=$id;
$this_name=$name;
$this_pass=$pass;
$this_email=$email;
$this_farmname=$farmname;
$this_address=$address;
$this_city=$city;
$this_state=$state;
$this_zip=$zip;
$this_phone1=$phone1;
$this_phone2=$phone2;
$this_phone3=$phone3;
}
}
All is good there. I can do a echo now and the string prints fine. But when I want to put it into an INPUT like:
<INPUT size="60" type="text" name="alterfarmname" value=<?php echo $this_farmname ?>>
This is the problem. The data is Double Day Farm and only displays Double for input.
Help PLease.
$fp = fopen("$homedir/user.txt","r"
flock($fp,2);
while($userinfo = fscanf($fp,"%[a-zA-Z0-9,. ]|%[a-zA-Z0-9@,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]|%[a-zA-Z0-9,. ]\n"){
list($id,$name,$pass,$email,$farmname,$address,$city,$state,$zip,$phone1,$phone2,$phone3)=$userinfo;
if($uid == $id){
$this_id=$id;
$this_name=$name;
$this_pass=$pass;
$this_email=$email;
$this_farmname=$farmname;
$this_address=$address;
$this_city=$city;
$this_state=$state;
$this_zip=$zip;
$this_phone1=$phone1;
$this_phone2=$phone2;
$this_phone3=$phone3;
}
}
All is good there. I can do a echo now and the string prints fine. But when I want to put it into an INPUT like:
<INPUT size="60" type="text" name="alterfarmname" value=<?php echo $this_farmname ?>>
This is the problem. The data is Double Day Farm and only displays Double for input.
Help PLease.