How is this wrong? Please Help.

B

Big Dix

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'}|$INPUT{'city'}|$INPUT{'state
'}|$INPUT{'zip'}|$INPUT{'phone'}|$INPUT{'time'}|$INPUT{'FullText'}\n";
 
R

Rusty

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top