469,610 Members | 1,649 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

How is this wrong? Please Help.

I am dealing with three different database files. If the user (me) chooses
to edit File 1 it opens File1.csv and so onfor File 3
But File three needs to written in a different format then File 1 and File
2.
My question is about line 4
I am getting an error. Why and what am I doing wrong that I am missing?
any ideas?
Thank you
1 $NextEntry = $perp_year;
2 if ($perp_mon < 10) { $NextEntry .= "0"; }
3 $NextEntry .= "$perp_mon";
4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
5 $NextEntry .= "$perp_day\n";
6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
7 $NewEntry .=
"$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";

Jul 19 '05 #1
1 1972
Seeing that you provided no error message all I can go by is what is in
your post. Carefully look at line 4:

if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }

The second part of your conditional says to assign the string 'File 3'
to the variable $editfiles. I don't think you want to do this but want
to do a comparison.

Rusty
Big Dix wrote:
I am dealing with three different database files. If the user (me) chooses
to edit File 1 it opens File1.csv and so onfor File 3
But File three needs to written in a different format then File 1 and File
2.
My question is about line 4
I am getting an error. Why and what am I doing wrong that I am missing?
any ideas?
Thank you
1 $NextEntry = $perp_year;
2 if ($perp_mon < 10) { $NextEntry .= "0"; }
3 $NextEntry .= "$perp_mon";
4 if (($perp_day < 10) && ($editfiles = "File 3")) { $NextEntry .= "0"; }
5 $NextEntry .= "$perp_day\n";
6 elsif ($perp_day < 10) { $NewEntry .= "0"; }
7 $NewEntry .=
"$perp_day|$INPUT{'Add'}|$URL|$INPUT{'address'}|$I NPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$I NPUT{'FullText'}\n";


Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Thomas G. Marshall | last post: by
5 posts views Thread by Krisnamourt Correia via SQLMonster.com | last post: by
3 posts views Thread by Kate Luu | last post: by
11 posts views Thread by frankie_85 | last post: by
14 posts views Thread by helpfulmaid | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.