Errors Undefined variable

the first time i tried display from folder now i am doing from db images and it is works but now i need shorter and longer hr

Move this line

$count++;

so that it runs after you check for the value, rather than before. Right now, you run the loop and $count increments to 1, you check and see that it’s 1, and reset it to zero. Your loop should be

count = 0
while loop conditions()
  if (count==1) { 
    do whatever you need to 
    count = 0
    }
  else {
    do the other things
    } 
  count++
} end of while loop

Probably loads of other ways too - flip between true an false, or even just flip between two class names to output the CSS directly.

getting errors

Post the exact error messages, and the code as it stands now. You can’t expect help with so little information to go on.

2 Likes
count = 0
while (count==1,count==3)
  if (count==1) { 
   echo'<hr width="700px">';
    count = 0
    }
  else {
    echo'<hr width="500px">';
    } 
  count++
} end

this is code

We need the error message.

they are all syntax error

Variables in PHP start with a $

i put that now still errors

Sorry, I should have mentioned that I was posting pseudo-code to show you the layout, not actual code. I figured the keywords I used would make that clear. I was intending to show really just where the value changes and checks should be.

count = 0
while (count==1,count==3)
  if (count==1) { 
   echo'<hr width="700px">';
    count = 0
    }
  else {
    echo'<hr width="500px">';
    } 
  count++
} end

Syntax aside, you can see that your while loop will never execute, because at the start you have set the count value to zero, but only run the loop while the value is 1 or 3. I’m not sure if you can use that syntax in while, either.

Go back to your original code loop, and add it the count changes to that.

can you put code like should be i am not sure

any help does anybody knows some good code for upload to add to my html form.I tried over 5 kinds of code they are not working.

Is this a new question? I see no mention of a form elsewhere in this thread.

no new question just if some knows good link for upload put here still need help with hr line

For upload of what? You need to explain more clearly. There is no previous mention of forms or uploading in this thread and I don’t see how that relates to the ongoing discussion.

upload i think i gotta it.Still need hr to fix

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.